<?php
namespace app\api\validate;

use think\Validate;

class Shop extends Validate
{
    protected $rule =   [
        'plat_id'  => 'require|number',
        'shop_id'  => 'require|number',
        'variety'  => 'require',
        'ids'      => 'require',
        'num'      => 'require|gt:0',
        'ship_date' => 'require',
    ];
    
    protected $message  =   [
        'plat_id'      => '参数有误1',
        'shop_id'     => '参数有误2',
        'variety'     => '参数有误3',
        'ids'     => '参数有误4',
        'num'     => '参数有误5',
        'ship_date' => '参数有误6',
    ];

    protected $scene = [
        'add'  =>  ['plat_id','shop_id','variety', 'ship_date'],
        'edit' =>  ['ids','num'],
        'del'  =>  ['ids'],
    ]; 
}