38 lines
780 B
PHP
38 lines
780 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Traits\Blameable;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\SoftDeletes;
|
|
|
|
class Livechat extends Model
|
|
{
|
|
use HasFactory, SoftDeletes, Blameable;
|
|
|
|
protected $fillable = [
|
|
'uuid',
|
|
'doctor_id',
|
|
'patient_id',
|
|
'organization_id',
|
|
'timezone',
|
|
'descriptions',
|
|
'payment_method',
|
|
'request_date',
|
|
'accept_date',
|
|
'start_date',
|
|
'end_date',
|
|
];
|
|
|
|
public function doctor() {
|
|
return $this->belongsTo(Person::class, 'doctor_id', 'id');
|
|
}
|
|
|
|
public function practitioner() {
|
|
return $this->belongsTo(Practitioner::class, 'doctor_id', 'id');
|
|
}
|
|
|
|
|
|
}
|