新增患者个人中心-详情接口
This commit is contained in:
@@ -14,6 +14,7 @@ use Hyperf\Snowflake\Concern\Snowflake;
|
||||
* @property int $order_inquiry_id 订单-问诊id
|
||||
* @property int $order_prescription_id 订单-处方id
|
||||
* @property int $doctor_id 医生id
|
||||
* @property int $patient_id 患者id
|
||||
* @property string $order_product_no 订单编号
|
||||
* @property string $escrow_trade_no 第三方支付流水号
|
||||
* @property int $order_product_status 订单状态(1:待支付 2:待发货 3:已发货 4:已签收 5:已完成 6:已取消)
|
||||
@@ -55,7 +56,7 @@ class OrderProduct extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['order_product_id', 'order_inquiry_id', 'order_prescription_id', 'doctor_id', 'order_product_no', 'escrow_trade_no', 'order_product_status', 'pay_channel', 'pay_status', 'cancel_reason', 'amount_total', 'payment_amount_total', 'logistics_fee', 'logistics_no', 'pay_time', 'remarks', 'refund_status', 'cancel_remarks', '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', 'doctor_id', 'patient_id', 'order_product_no', 'escrow_trade_no', 'order_product_status', 'pay_channel', 'pay_status', 'cancel_reason', 'amount_total', 'payment_amount_total', 'logistics_fee', 'logistics_no', 'pay_time', 'remarks', 'refund_status', 'cancel_remarks', '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 string $primaryKey = "order_product_id";
|
||||
|
||||
@@ -90,4 +91,14 @@ class OrderProduct extends Model
|
||||
{
|
||||
return self::where($params)->exists();
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取数量
|
||||
* @param array $params
|
||||
* @return int
|
||||
*/
|
||||
public static function getCount(array $params): int
|
||||
{
|
||||
return self::where($params)->count();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user