|
|
@@ -20,6 +20,7 @@ class GoodsValidate extends BaseValidate
|
|
|
protected $rule = [
|
|
|
'id' => 'require',
|
|
|
'goods_category_ids' => 'require',
|
|
|
+ 'goods_category_id'=>'require',
|
|
|
'goods_name' => 'require',
|
|
|
'goods_number' => 'require',
|
|
|
'base_service_fee' => 'require',
|
|
|
@@ -37,6 +38,7 @@ class GoodsValidate extends BaseValidate
|
|
|
protected $field = [
|
|
|
'id' => 'id',
|
|
|
'goods_category_ids' => '服务类目',
|
|
|
+ 'goods_category_id' => '服务类目',
|
|
|
'goods_name' => '商品名称',
|
|
|
'goods_number' => '商品数量',
|
|
|
'base_service_fee' => '基础服务费',
|
|
|
@@ -46,50 +48,20 @@ class GoodsValidate extends BaseValidate
|
|
|
|
|
|
];
|
|
|
|
|
|
-
|
|
|
- /**
|
|
|
- * @notes 添加场景
|
|
|
- * @return GoodsValidate
|
|
|
- * @author likeadmin
|
|
|
- * @date 2024/07/07 18:37
|
|
|
- */
|
|
|
- public function sceneAdd()
|
|
|
- {
|
|
|
- return $this->only(['goods_category_ids','goods_category_id','goods_name','goods_number','base_service_fee','service_total','service_fee','goods_status']);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
- /**
|
|
|
- * @notes 编辑场景
|
|
|
- * @return GoodsValidate
|
|
|
- * @author likeadmin
|
|
|
- * @date 2024/07/07 18:37
|
|
|
- */
|
|
|
- public function sceneEdit()
|
|
|
- {
|
|
|
- return $this->only(['id','goods_category_ids','goods_category_id','goods_name','goods_number','base_service_fee','service_total','service_fee','goods_status']);
|
|
|
- }
|
|
|
-
|
|
|
-
|
|
|
/**
|
|
|
- * @notes 删除场景
|
|
|
+ * @notes 详情场景
|
|
|
* @return GoodsValidate
|
|
|
- * @author likeadmin
|
|
|
- * @date 2024/07/07 18:37
|
|
|
*/
|
|
|
- public function sceneDelete()
|
|
|
+ public function sceneCategory()
|
|
|
{
|
|
|
- return $this->only(['id']);
|
|
|
+ return $this->only(['goods_category_id']);
|
|
|
}
|
|
|
|
|
|
-
|
|
|
/**
|
|
|
* @notes 详情场景
|
|
|
* @return GoodsValidate
|
|
|
- * @author likeadmin
|
|
|
- * @date 2024/07/07 18:37
|
|
|
*/
|
|
|
- public function sceneDetail()
|
|
|
+ public function sceneGoods()
|
|
|
{
|
|
|
return $this->only(['id']);
|
|
|
}
|