'require', 'product_attr_unique' => 'require', 'store_id' => 'require|number', 'staff_id' => 'require|number', 'product_id' => 'require|number', ]; /** * 参数描述 * @var string[] */ protected $field = [ 'cart_num' => '数量', 'store_id' => '店铺id', 'staff_id' => '员工id', 'product_id' => '商品id', 'product_attr_unique' => '商品规格', ]; /** * @notes 添加场景 * @return CartValidate * @author likeadmin * @date 2024/04/24 10:37 */ public function sceneAdd() { return $this->only(['cart_num','store_id','product_id']); } public function sceneStoreAdd() { return $this->only(['cart_num','product_id']); } /** * @notes 编辑场景 * @return CartValidate * @author likeadmin * @date 2024/04/24 10:37 */ public function sceneChange() { return $this->only(['cart_num','store_id','product_id']); } /** * @notes 编辑场景 * @return CartValidate * @author likeadmin * @date 2024/04/24 10:37 */ public function sceneStoreChange() { return $this->only(['cart_num','product_id']); } /** * @notes 删除场景 * @return CartValidate * @author likeadmin * @date 2024/04/24 10:37 */ public function sceneDelete() { return $this->only(['id']); } /** * @notes 详情场景 * @return CartValidate * @author likeadmin * @date 2024/04/24 10:37 */ public function sceneDetail() { return $this->only(['']); } }