nanosanteservice/app/Models/NhMedicalPrescription.php

59 lines
1.3 KiB
PHP
Raw Normal View History

2021-11-19 16:07:42 +00:00
<?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
2021-11-19 16:07:42 +00:00
* @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',
2021-12-20 11:20:58 +00:00
// 'insurer_paid_amount' => 'float',
'billed' => 'boolean'
2021-11-19 16:07:42 +00:00
];
protected $fillable = [
'drug_or_device_id',
'drug_or_device_name',
2021-11-19 16:07:42 +00:00
'dosage',
'quantity',
'unit_price',
'insured_paid_amount',
'insurer_paid_amount',
2021-12-20 11:20:58 +00:00
'billed',
2021-11-19 16:07:42 +00:00
'created_at',
'updated_at'
];
public function drug_or_device()
{
return $this->belongsTo(NhDrugsAndDevice::class, 'drug_or_device_id');
}
2021-11-19 16:07:42 +00:00
}