<?php
namespace app\admin\validate\medical;

use think\Validate;

class SalesmanValidate extends Validate
{
    protected $rule =   [
        'salesman_id'             => 'require',
        'salesman_shop_id'        => 'require',
        'salesman_name'           => 'require',
        'salesman_pwd'            => 'require',
        'again_salesman_pwd'      => 'require',
        'salesman_phone'          => 'require',
        'salesman_resale_name'    => 'require',
        'salesman_status'         => 'require',
    ];

    protected $message  =   [
        'salesman_id.require'          => '业务员ID不能为空',
        'salesman_shop_id.require'     => '店铺ID不能为空',
        'salesman_name.require'        => '登录名不能为空',
        'salesman_pwd.require'         => '密码不能为空',
        'again_salesman_pwd.require'   => '确认密码不能为空',
        'salesman_phone.require'       => '业务员手机号不能为空',
        'salesman_resale_name.require' => '业务员姓名不能为空',
        'salesman_status.require'      => '状态不能为空',
    ];

    //场景
    protected $scene = [
        'create'           => [
            'salesman_shop_id','salesman_name','salesman_pwd',
            'again_salesman_pwd','salesman_phone','salesman_resale_name',
            'salesman_status'],
        'info'          => ['salesman_id'],
        'update'           => ['salesman_id']
    ];
}
