initial commit
This commit is contained in:
@@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
|
||||
class TreatmentDetail extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
// Menentukan kolom yang boleh diisi secara massal
|
||||
protected $fillable = [
|
||||
'treatment_id',
|
||||
'medicine_id',
|
||||
'dosis',
|
||||
'keterangan_pakai',
|
||||
];
|
||||
|
||||
/**
|
||||
* Relasi balik ke Header Treatment (Rekam Medis Utama)
|
||||
*/
|
||||
public function treatment()
|
||||
{
|
||||
return $this->belongsTo(Treatment::class);
|
||||
}
|
||||
|
||||
/**
|
||||
* Relasi ke data Obat (Inventory)
|
||||
*/
|
||||
public function medicine()
|
||||
{
|
||||
return $this->belongsTo(Medicine::class);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user