多药房
Build Docker / build (push) Canceled after 0s

This commit is contained in:
haomingming
2026-09-08 10:09:07 +08:00
parent 4dfcdacb12
commit d3fce247e5
20 changed files with 782 additions and 65 deletions
+19 -1
View File
@@ -55,12 +55,17 @@ use Hyperf\Snowflake\Concern\Snowflake;
* @property string $consignee_name_mask 收货人姓名(掩码)
* @property string $consignee_tel 收货人电话
* @property string $consignee_tel_mask 收货人电话(掩码)
* @property int|string $pharmacy_id 发货药房id
* @property string $pharmacy_code 发货药房代码快照
* @property string $pharmacy_name 发货药房名称快照
* @property int $delivery_type 配送方式(1:自提 2:快递)
* @property Carbon $created_at 创建时间
* @property Carbon $updated_at 修改时间
* @property-read Collection|OrderProductItem[]|null $OrderProductItem
* @property-read OrderPrescription|null $OrderPrescription
* @property-read PatientFamily|null $PatientFamily
* @property-read Collection|OrderPrescriptionIcd[]|null $OrderPrescriptionIcd
* @property-read Pharmacy|null $Pharmacy
*/
class OrderProduct extends Model
{
@@ -74,10 +79,23 @@ class OrderProduct extends Model
/**
* The attributes that are mass assignable.
*/
protected array $fillable = ['order_product_id', 'order_inquiry_id', 'order_prescription_id', 'order_id', 'doctor_id', 'patient_id', 'family_id', 'order_product_no', 'escrow_trade_no', 'order_product_status', 'pay_channel', 'pay_status', 'is_delete', 'cancel_reason', 'amount_total', 'coupon_amount_total', 'payment_amount_total', 'logistics_fee', 'logistics_no', 'logistics_company_code', 'sub_logistics_status', 'delivery_time', 'pay_time', 'remarks', 'refund_status', 'cancel_time', 'cancel_remarks', 'report_pre_status', 'report_pre_time', 'report_pre_fail_reason', 'province_id', 'province', 'city_id', 'city', 'county_id', 'county', 'address', 'address_mask', 'consignee_name', 'consignee_name_mask', 'consignee_tel', 'consignee_tel_mask', 'created_at', 'updated_at'];
protected array $fillable = ['order_product_id', 'order_inquiry_id', 'order_prescription_id', 'order_id', 'doctor_id', 'pharmacy_id', 'pharmacy_code', 'pharmacy_name', 'delivery_type', 'patient_id', 'family_id', 'order_product_no', 'escrow_trade_no', 'order_product_status', 'pay_channel', 'pay_status', 'is_delete', 'cancel_reason', 'amount_total', 'coupon_amount_total', 'payment_amount_total', 'logistics_fee', 'logistics_no', 'logistics_company_code', 'sub_logistics_status', 'delivery_time', 'pay_time', 'remarks', 'refund_status', 'cancel_time', 'cancel_remarks', 'report_pre_status', 'report_pre_time', 'report_pre_fail_reason', 'province_id', 'province', 'city_id', 'city', 'county_id', 'county', 'address', 'address_mask', 'consignee_name', 'consignee_name_mask', 'consignee_tel', 'consignee_tel_mask', 'created_at', 'updated_at'];
protected array $casts = [
'pharmacy_id' => 'string',
'delivery_type' => 'integer',
];
protected string $primaryKey = "order_product_id";
/**
* 关联药房表
*/
public function Pharmacy(): HasOne
{
return $this->hasOne(Pharmacy::class, 'pharmacy_id', 'pharmacy_id');
}
/**
* 关联订单商品item表
*/