Merge branch 'staging' of https://dev.sismedika.online/febio/aso into staging

This commit is contained in:
Linksehat Staging Server
2024-07-12 08:48:13 +07:00
15 changed files with 829 additions and 1054 deletions

View File

@@ -52,4 +52,18 @@ class Prescription extends Model
'dTanggalResep' => 'datetime',
];
public function user()
{
return $this->belongsTo(User::class, 'nIDUser', 'nID');
}
public function items()
{
return $this->hasMany(PrescriptionItem::class, 'nIDPrescription', 'nID');
}
public function livechat(){
return $this->belongsTo(Livechat::class, 'nIDLivechat', 'nID');
}
}

View File

@@ -50,4 +50,10 @@ class PrescriptionItem extends Model
];
protected $primaryKey = 'nID';
public function prescription()
{
return $this->belongsTo(Prescription::class, 'nIDPrescription', 'nID');
}
}