新增取消药品订单队列,新增创建药品订单
This commit is contained in:
@@ -15,6 +15,7 @@ use Hyperf\Snowflake\Concern\Snowflake;
|
||||
* @property int $prescription_product_id 主键id
|
||||
* @property int $order_prescription_id 订单-处方id
|
||||
* @property int $product_id 商品id
|
||||
* @property int $use_status 使用状态(1:已使用 0:未使用)
|
||||
* @property int $prescription_product_num 商品数量
|
||||
* @property string $product_name 商品名称
|
||||
* @property string $product_spec 商品规格
|
||||
@@ -41,7 +42,7 @@ class OrderPrescriptionProduct extends Model
|
||||
/**
|
||||
* The attributes that are mass assignable.
|
||||
*/
|
||||
protected array $fillable = ['prescription_product_id', 'order_prescription_id', 'product_id', 'prescription_product_num', 'product_name', 'product_spec', 'license_number', 'manufacturer', 'single_unit', 'single_use', 'packaging_unit', 'frequency_use', 'available_days', 'created_at', 'updated_at'];
|
||||
protected array $fillable = ['prescription_product_id', 'order_prescription_id', 'product_id', 'use_status', 'prescription_product_num', 'product_name', 'product_spec', 'license_number', 'manufacturer', 'single_unit', 'single_use', 'packaging_unit', 'frequency_use', 'available_days', 'created_at', 'updated_at'];
|
||||
|
||||
protected string $primaryKey = "prescription_product_id";
|
||||
/**
|
||||
@@ -149,4 +150,9 @@ class OrderPrescriptionProduct extends Model
|
||||
->where($params)->first($fields);
|
||||
|
||||
}
|
||||
|
||||
public static function edit(array $params = [], array $data = []): int
|
||||
{
|
||||
return self::where($params)->update($data);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user