Files
aso/app/Models/Appointment.php
Linksehat Staging Server 70fc1579e7 update
2024-07-12 08:41:18 +07:00

41 lines
863 B
PHP
Executable File

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Appointment extends Model
{
use HasFactory;
protected $fillable = [
'status',
'cancelation_reason',
'appointment_type',
'speciality_id',
'description',
'duration_minutes',
'start_time',
'end_time',
'organization_id',
'comment',
'patient_instruction'
];
public function appointmentParticipants()
{
return $this->hasMany(AppointmentParticipant::class, 'appointment_id');
}
public function speciality()
{
return $this->belongsTo(Speciality::class, 'speciality_id');
}
public function organization()
{
return $this->belongsTo(Organization::class, 'organization_id');
}
}