<?php


namespace Validate;


/**
 * Class GoodsAddValidate
 *
 * @package Validate
 */
class GoodsAddValidate extends BaseValidate
{
    protected $rule = [
        'goods_name' => 'require|length:1,50',
        'category_1_id' => 'require',
        'category_2_id' => 'require',
        'desc' => 'length:0,50',
        'desc_pic_url' => 'require',
        'price' => 'require',
        'expiration_time' => 'require',
        'sub_shop_ids' => 'require',
        'rule_refund' => 'require',
        'introduce' => 'length:0,200',
        'inventory' => 'require',
    ];

    protected $message = [
        'goods_name' => '请检查商品名称，内容不能太长或者不填写',
        'category_1_id' => '请选择所属类目',
        'category_2_id' => '请选择所属类目',
        'desc' => '商品说明内容不能过长',
        'desc_pic_url' => '请上传商品图片',
        'price' => '请填写售价',
        'expiration_time' => '请填写到期时间',
        'sub_shop_ids' => '门店id不能为空',
        'rule_refund' => '请选择退款规则',
        'introduce' => '商品介绍内容不能过长',
        'inventory' => '请填写库存',
    ];
}