@@ -36,12 +36,16 @@ use Hyperf\Snowflake\Concern\Snowflake;
|
||||
* @property string $patient_name 患者姓名-就诊人
|
||||
* @property int $patient_sex 患者性别-就诊人(1:男 2:女)
|
||||
* @property int $patient_age 患者年龄-就诊人
|
||||
* @property int|string $pharmacy_id 开方药房id
|
||||
* @property string $pharmacy_code 开方药房代码快照
|
||||
* @property string $pharmacy_name 开方药房名称快照
|
||||
* @property string $doctor_advice 医嘱
|
||||
* @property \Carbon\Carbon $created_at 创建时间
|
||||
* @property \Carbon\Carbon $updated_at 修改时间
|
||||
* @property-read \Hyperf\Database\Model\Collection|OrderPrescriptionIcd[] $OrderPrescriptionIcd
|
||||
* @property-read \Hyperf\Database\Model\Collection|OrderPrescriptionProduct[] $OrderPrescriptionProduct
|
||||
* @property-read UserDoctor $UserDoctor
|
||||
* @property-read Pharmacy|null $Pharmacy
|
||||
*/
|
||||
class OrderPrescription extends Model
|
||||
{
|
||||
@@ -55,10 +59,22 @@ class OrderPrescription extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['order_prescription_id', 'order_inquiry_id', 'doctor_id', 'patient_id', 'family_id', 'pharmacist_id', 'prescription_status', 'pharmacist_audit_status', 'pharmacist_verify_time', 'pharmacist_fail_reason', 'platform_audit_status', 'platform_fail_time', 'platform_fail_reason', 'is_auto_phar_verify', 'doctor_created_time', 'expired_time', 'is_delete', 'prescription_code', 'doctor_name', 'patient_name', 'patient_sex', 'patient_age', 'doctor_advice', 'created_at', 'updated_at'];
|
||||
protected array $fillable = ['order_prescription_id', 'order_inquiry_id', 'doctor_id', 'pharmacy_id', 'pharmacy_code', 'pharmacy_name', 'patient_id', 'family_id', 'pharmacist_id', 'prescription_status', 'pharmacist_audit_status', 'pharmacist_verify_time', 'pharmacist_fail_reason', 'platform_audit_status', 'platform_fail_time', 'platform_fail_reason', 'is_auto_phar_verify', 'doctor_created_time', 'expired_time', 'is_delete', 'prescription_code', 'doctor_name', 'patient_name', 'patient_sex', 'patient_age', 'doctor_advice', 'created_at', 'updated_at'];
|
||||
|
||||
protected array $casts = [
|
||||
'pharmacy_id' => 'string',
|
||||
];
|
||||
|
||||
protected string $primaryKey = "order_prescription_id";
|
||||
|
||||
/**
|
||||
* 关联药房表
|
||||
*/
|
||||
public function Pharmacy(): HasOne
|
||||
{
|
||||
return $this->hasOne(Pharmacy::class, 'pharmacy_id', 'pharmacy_id');
|
||||
}
|
||||
|
||||
/**
|
||||
* 关联处方疾病表
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user