<?php
namespace app\api\validate;

use think\Validate;

class UserLevel extends Validate
{
    protected $rule = [
        'appid'         =>  'require',
        'user_id'       =>  'require|max:255',
        'level'         =>  'require|number|between:0,3',
        'overdue_time'  =>  'require|number'
    ];

    protected $message  =   [
        'appid.require'         => 'appid 不可為空',
        'user_id.require'       => 'User Id不可為空',
        'level.require'         => 'Level不可為空',
        'level.number'          => 'Level必需是數字',
        'level.between'         => 'Level只能在0-3之間',
        'overdue_time.require'  => 'overdue_time不可為空',
        'overdue_time.number'   => 'overdue_time必需是數字',    
    ];
}