<?php


namespace Validate;


/**
 * Class GoodsAddValidate
 *
 * @package Validate
 */
class GoodsAddValidate extends BaseValidate
{
    protected $rule = [
        'category_1_id' => 'require',
        'category_2_id' => 'require',
        'name' => 'require',
        'url' => 'require',
        'expiration_time' => 'require',
        'rule_desc' => 'require',
        'price' => 'require',
        'inventory_total' => 'require',
        'life_account_id' => 'require',
        'merchant_id' => 'require',
        'u_id' => 'require',
    ];

    protected $message = [
        'category_1_id' => '请选择所属类目',
        'category_2_id' => '请选择所属类目',
        'name' => '商品名称不能为空',
        'url' => '请上传商品图片',
        'expiration_time' => '请填写到期时间',
        'rule_desc' => '请填写使用规则',
        'price' => '请填写售价',
        'inventory_total' => '请填写库存',
        'life_account_id' => 'life_account_id 不能为空',
        'merchant_id' => 'merchant_id 不能为空',
        'u_id' => 'u_id 不能为空',
    ];
}