36 lines
824 B
PHP
36 lines
824 B
PHP
<?php
|
|
|
|
namespace Modules\Meeting\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Modules\Employee\Models\Employee;
|
|
use App\Traits\CreatedUpdatedBy;
|
|
use App\Traits\StatusTrait;
|
|
|
|
class MeetingMinute extends Model
|
|
{
|
|
use HasFactory;
|
|
use CreatedUpdatedBy, StatusTrait;
|
|
use \Staudenmeir\EloquentJsonRelations\HasJsonRelationships;
|
|
|
|
/**
|
|
* The attributes that are mass assignable.
|
|
*/
|
|
protected $casts = [
|
|
'attendees' => 'array',
|
|
];
|
|
protected $table = 'meeting_minutes';
|
|
protected $guarded = [];
|
|
|
|
public function meeting()
|
|
{
|
|
return $this->belongTo(Meeting::class, 'meeting_id');
|
|
}
|
|
|
|
public function assignedUser()
|
|
{
|
|
return $this->belongsToJson(Employee::class, 'attendees->ids');
|
|
}
|
|
}
|