26 lines
516 B
PHP
26 lines
516 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Models\Treatment;
|
|
use App\Models\Registration;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class PatientTreatment extends Model
|
|
{
|
|
use HasFactory;
|
|
|
|
protected $fillable = ['registration_id', 'treatment_id', 'quantity'];
|
|
|
|
public function registration()
|
|
{
|
|
return $this->belongsTo(Registration::class);
|
|
}
|
|
|
|
public function treatment()
|
|
{
|
|
return $this->belongsTo(Treatment::class);
|
|
}
|
|
}
|