59 lines
1.3 KiB
PHP
59 lines
1.3 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Created by Reliese Model.
|
|
*/
|
|
|
|
namespace App\Models;
|
|
|
|
use Carbon\Carbon;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
/**
|
|
* Class NhMedicalPrescription
|
|
*
|
|
* @property int $id
|
|
* @property int $drug_or_device_id
|
|
* @property string $drug_or_device_name
|
|
* @property string $dosage
|
|
* @property int $quantity
|
|
* @property float $unit_price
|
|
* @property float $insured_paid_amount
|
|
* @property float $insurer_paid_amount
|
|
* @property Carbon $created_at
|
|
* @property Carbon $updated_at
|
|
*
|
|
* @package App\Models
|
|
*/
|
|
class NhMedicalPrescription extends Model
|
|
{
|
|
protected $table = 'nh_medical_prescriptions';
|
|
|
|
protected $casts = [
|
|
'drug_or_device_id' => 'int',
|
|
'quantity' => 'int',
|
|
// 'unit_price' => 'float',
|
|
// 'insured_paid_amount' => 'float',
|
|
// 'insurer_paid_amount' => 'float',
|
|
'billed' => 'boolean'
|
|
];
|
|
|
|
protected $fillable = [
|
|
'drug_or_device_id',
|
|
'drug_or_device_name',
|
|
'dosage',
|
|
'quantity',
|
|
'unit_price',
|
|
'insured_paid_amount',
|
|
'insurer_paid_amount',
|
|
'billed',
|
|
'created_at',
|
|
'updated_at'
|
|
];
|
|
|
|
public function drug_or_device()
|
|
{
|
|
return $this->belongsTo(NhDrugsAndDevice::class, 'drug_or_device_id');
|
|
}
|
|
}
|