<?php
/**
 * @copyright   Copyright (c) 2017 https://www.sapixx.com All rights reserved.
 * @license     Licensed (http://www.apache.org/licenses/LICENSE-2.0).
 * @author      pillar<ltmn@qq.com>
 * 商品分类
 */
namespace app\bestbao\validate;
use think\Validate;

class Engineer extends Validate{

    protected $rule = [
        'id'         => 'require|number',
        'uid'        => 'require|number',
        'title'      => 'require',
        'occupation' => 'require',
        'level'      => 'require',
        'sort'       => 'require',
    ];

    protected $message = [
        'id'         => 'ID丢失',
        'uid'        => '必须选择绑定UID',
        'title'      => '姓名必须填写',
        'about'      => '特长必须填写',
        'occupation' => '职位必须填写',
        'level'      => '等级必须填写',
        'sort'       => '序号必须填写',
    ];

    protected $scene = [
        'edit'  => ['title','position','about','level'],
        'sort'  => ['id', 'sort'],
    ];
}