35 lines
848 B
PHP
35 lines
848 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
use App\Models\IamPrincipal;
|
|
use App\Models\FeedbackReaction;
|
|
|
|
class ManageFeedback extends Model
|
|
{
|
|
use SoftDeletes;
|
|
use HasFactory;
|
|
protected $table = "manage_feedback";
|
|
protected $fillable = ['principal_xid', 'feedback_reaction_xid', 'comment'];
|
|
|
|
public function principal()
|
|
{
|
|
return $this->belongsTo(IamPrincipal::class, 'principal_xid', 'id')->withDefault([
|
|
'id' => null, // Default id value
|
|
// Add more default attributes as needed
|
|
]);
|
|
}
|
|
|
|
|
|
public function feedbackReaction()
|
|
{
|
|
return $this->belongsTo(feedbackReaction::class, 'feedback_reaction_xid', 'feedback_reaction_xid');
|
|
}
|
|
|
|
|
|
|
|
}
|