update report resep online

This commit is contained in:
2024-07-12 08:23:11 +07:00
parent 18946128aa
commit 8e8aa9cb41
15 changed files with 829 additions and 1058 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');
}
}