35 lines
860 B
PHP
35 lines
860 B
PHP
|
|
<?php
|
||
|
|
|
||
|
|
namespace App\Models\admin;
|
||
|
|
|
||
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||
|
|
use Illuminate\Database\Eloquent\Model;
|
||
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
||
|
|
use App\Models\IamPrincipal;
|
||
|
|
use App\Models\admin\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');
|
||
|
|
}
|
||
|
|
|
||
|
|
|
||
|
|
|
||
|
|
}
|