<?php
namespace App\Validators;

/**
 * 服务人员申请验证器
 */
class ServiceUserValidator extends BaseValidator {
    //验证规则
    protected $rule =[
        'pic' =>'required',
        'name' =>'required|name',
        'mobile' =>'required|mobile',
        'customer_num' =>'required|numeric',
        'sex' =>'required',
        'birthday' =>'required',
        'agree_user' =>'nullable',
        'disagree_user' =>'nullable',
        'reason' =>'required',
        'think' =>'required',
        'outlook' =>'required',
        'idea' =>'required',
    ];
    //自定义验证信息
    protected $message = [
        'pic.required' =>'请上传头像',
        'name.required' =>'请填写真实姓名',
        'name.name' =>'真实姓名格式错误',
        'mobile.required' =>'请填写手机号',
        'mobile.mobile' =>'手机号格式错误',
        'customer_num.required' =>'请填写服务客户数量',
        'customer_num.numeric' =>'服务客户数量需为数字',
        'sex.required' =>'请选择性别',
        'birthday.required' =>'请填写生日',
//        'agree_user.required' =>'请填写对服务满意的用户名',
//        'disagree_user.required' =>'请填写对服务不满意的用户名',
        'reason.required' =>'请填写申请此职位的原因',
        'think.required' =>'请填写你认为此职业需要做哪些工作',
        'outlook.required' =>'请填写你认为此职业需要哪些能力和素质',
        'idea.required' =>'请填写你对此职业有哪些建议来帮助团队成长',

    ];

    //自定义场景
    protected $scene = [
        'coaches' => ['pic','name','mobile','sex','birthday','customer_num','reason','think','outlook','idea'],
        'main_coaches' => ['pic','name','mobile','sex','birthday','customer_num','agree_user','disagree_user','reason','think','outlook','idea'],
        'customer_service_user' => ['pic','name','mobile','sex','birthday','customer_num','agree_user','disagree_user','reason','think','outlook','idea'],
        'partner' => ['name','mobile'],
        'chef_user' => ['name','mobile','reason'],
    ];
}
