Add API
This commit is contained in:
41
app/Models/PractitionerRole.php
Normal file
41
app/Models/PractitionerRole.php
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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');
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user