42 lines
851 B
PHP
42 lines
851 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class PractitionerRole extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = [
|
|
'practitioner_id',
|
|
'organization_id',
|
|
'speciality_id',
|
|
'identifier_id',
|
|
'period_start',
|
|
'period_end',
|
|
'active',
|
|
];
|
|
|
|
public function metas()
|
|
{
|
|
return $this->morphMany(Meta::class, 'metaable');
|
|
}
|
|
|
|
public function organization()
|
|
{
|
|
return $this->belongsTo(Organization::class, 'organization_id');
|
|
}
|
|
|
|
public function practitioner()
|
|
{
|
|
return $this->belongsTo(Practitioner::class, 'practitioner_id');
|
|
}
|
|
|
|
public function speciality()
|
|
{
|
|
return $this->belongsTo(Speciality::class, 'speciality_id');
|
|
}
|
|
}
|