Files
hpt_inventory/app/Models/Appointment.php
2026-06-10 16:42:20 +07:00

36 lines
855 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use MongoDB\Driver\Session;
use App\Traits\AuditLogTrait;
class Appointment extends BaseModel
{
protected $table = "appointments";
public $timestamps = false;
use HasFactory;
use AuditLogTrait;
/**
* The table associated with the model.
*
* @var string
*/
protected $fillable = ['patient_id','appointment_date','appointment_type','doctor_id','description','lab_id','created_at','created_by','updated_at','updated_by','record_status_id'];
public static function boot()
{
parent::boot();
}
public function patient(){
return $this->belongsTo(Patient::class, 'patient_id', 'id');
}
public function doctor(){
return $this->belongsTo(Physician::class, 'doctor_id','id');
}
}