initial commit

This commit is contained in:
Inshal
2024-10-25 01:05:27 +05:00
commit 94cd8a1dc9
1710 changed files with 273609 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Support\Str;
class Appointment extends Model
{
protected $table = "appointments";
protected $fillable = [
'telemed_pros_id',
'patient_id',
'appointment_time',
'in_call',
'meeting_id',
'agent_call_token',
'patient_call_token',
'video_token',
'appointment_date',
'patient_email',
'patient_name',
'timezone',
'analytics',
'start_time',
'end_time',
'duration',
'status'
];
public function telemedPro()
{
return $this->belongsTo(Telemedpro::class, 'telemed_pros_id', 'id');
}
public function patient()
{
return $this->belongsTo(Patient::class, 'patient_id', 'id');
}
public function getMeetingCountAttribute()
{
return $this->appointments()->count();
}
public function cart()
{
return $this->hasOne(Cart::class);
}
}