|
@@ -10,39 +10,39 @@ class GoodsValidate extends Validate
|
|
|
'goods_id' => 'require|alphaDash',
|
|
|
'join_goods_category_id' => 'integer',
|
|
|
'join_goods_device_id' => 'max:32',
|
|
|
- 'goods_classify' => 'require|in:GOODS,DEVICE,SERVICE,SPECIAL,PACKAGE,OTHER', // GOODS=实物商品|DEVICE=设备|SERIVCE=服务|SPECIAL=专题业务|PACKAGE=套包|OTHER=其他
|
|
|
- 'goods_status' => 'require|in:PENDING,ON,OFF,DISABLED', // 产品状态 PENDING=待处理|ON=上架(已激活)|OFF=下架|DISABLED=已禁用
|
|
|
- 'goods_category' => 'max:32',
|
|
|
- 'goods_prefix' => 'max:64 ',
|
|
|
- 'goods_name' => 'require|max:32',
|
|
|
- 'goods_market_price' => 'float',
|
|
|
- 'goods_sales_price' => 'float',
|
|
|
+ 'goods_classify|归类' => 'require|in:GOODS,DEVICE,SERVICE,SPECIAL,PACKAGE,OTHER', // GOODS=实物商品|DEVICE=设备|SERIVCE=服务|SPECIAL=专题业务|PACKAGE=套包|OTHER=其他
|
|
|
+ 'goods_status|状态' => 'require|in:PENDING,ON,OFF,DISABLED', // 产品状态 PENDING=待处理|ON=上架(已激活)|OFF=下架|DISABLED=已禁用
|
|
|
+ 'goods_category|分类' => 'max:32',
|
|
|
+ 'goods_prefix|前缀' => 'max:64 ',
|
|
|
+ 'goods_name|名称' => 'require|max:32',
|
|
|
+ 'goods_market_price|市场价' => 'float',
|
|
|
+ 'goods_sales_price|销售价' => 'float',
|
|
|
// 'goods_sku_json' => 'isJson',
|
|
|
- 'goods_attribute_json' => 'isJson',
|
|
|
- 'goods_service_json' => 'isJson',
|
|
|
- 'goods_title' => 'max:128',
|
|
|
- 'goods_cover' => 'url',
|
|
|
- 'goods_on_addtimes' => 'date',
|
|
|
- 'goods_sort' => 'integer',
|
|
|
- 'goods_groupby' => 'max:32;',
|
|
|
+ 'goods_attribute_json|属性' => 'isJson',
|
|
|
+ 'goods_service_json|服务' => 'isJson',
|
|
|
+ 'goods_title|标题' => 'max:128',
|
|
|
+ 'goods_cover|封面' => 'url',
|
|
|
+ 'goods_on_addtimes|上架时间' => 'date',
|
|
|
+ 'goods_sort|排序' => 'integer',
|
|
|
+ 'goods_groupby|分组' => 'max:32;',
|
|
|
'goods_extend_json' => 'isJson',
|
|
|
// 'goods_slide' => 'regex:/^[0-9a-zA-Z\.\/\,]+$/',
|
|
|
- 'goods_specs_json' => 'isJson',
|
|
|
+ 'goods_specs_json|规格参数' => 'isJson',
|
|
|
// 'goods_content' => '',
|
|
|
- 'goods_label' => 'max:32',
|
|
|
+ 'goods_label|标签' => 'max:32',
|
|
|
// 'goods_label_extend_json' => '',
|
|
|
- 'goods_storage' => 'float',
|
|
|
- 'goods_sale' => 'float',
|
|
|
- 'goods_running_off_type' => 'require|in:H,T',
|
|
|
- 'goods_running_off_json' => 'isJson',
|
|
|
- 'goods_sku_status' => 'in:PENDING,ON,OFF,DISABLED', // 产品sku状态 PENDING=待启用|ON=上架|OFF=下架|DISABLED=已禁用
|
|
|
- 'goods_sku_specs_json' => 'isJson',
|
|
|
- 'goods_sku_title' => 'max:64',
|
|
|
- 'goods_sku_images_json' => 'isJson',
|
|
|
+ 'goods_storage|库存量' => 'float',
|
|
|
+ 'goods_sale|销售量' => 'float',
|
|
|
+ 'goods_running_off_type|下架方式' => 'require|in:H,T',
|
|
|
+ 'goods_running_off_json|下架' => 'isJson',
|
|
|
+ 'goods_sku_status|SKU状态' => 'in:PENDING,ON,OFF,DISABLED', // 产品sku状态 PENDING=待启用|ON=上架|OFF=下架|DISABLED=已禁用
|
|
|
+ 'goods_sku_specs_json|规格' => 'isJson',
|
|
|
+ 'goods_sku_title|SKU标题' => 'max:64',
|
|
|
+ 'goods_sku_images_json|SKU图片' => 'isJson',
|
|
|
// 'goods_sku_content' => '',
|
|
|
- 'goods_sku_market_price' => 'float',
|
|
|
- 'goods_sku_sales_price' => 'float',
|
|
|
- 'goods_sku_storage_json' => 'isJson',
|
|
|
+ 'goods_sku_market_price|市场价' => 'float',
|
|
|
+ 'goods_sku_sales_price|销售价' => 'float',
|
|
|
+ 'goods_sku_storage_json|库存' => 'isJson',
|
|
|
'goods_sku_service_json' => 'isJson',
|
|
|
'goods_sku_extend_json' => 'isJson',
|
|
|
];
|