<?php
namespace app\api\validate;

use think\Validate;

class Stock extends Validate
{
    protected $rule =   [
        'type_id'  => 'require|string',
        'type'     => 'require|number',
        'variety'  => 'require',  
          
    ];
    
    protected $message  =   [
        'type_id'      => '参数有误',
        'type'         => '参数有误',
        'variety'      => '参数有误',    
    ];


 
    protected $scene = [
        'add'  =>  ['type_id','type','variety'],
      
    ]; 
}