Merge branch 'staging' of https://dev.sismedika.online/febio/aso into staging
This commit is contained in:
@@ -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');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -50,4 +50,10 @@ class PrescriptionItem extends Model
|
||||
];
|
||||
|
||||
protected $primaryKey = 'nID';
|
||||
|
||||
public function prescription()
|
||||
{
|
||||
return $this->belongsTo(Prescription::class, 'nIDPrescription', 'nID');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user