<?php
namespace app\workerapi\validate;
use app\common\enum\notice\NoticeEnum;
use app\common\service\sms\SmsDriver;
use app\common\validate\BaseValidate;

class MasterWokerTeamValidate  extends BaseValidate
{
    protected $rule = [
        'id' => 'require',
        'name' => 'require',
        'age' => 'require',
        'mobile' => 'require',
        'lon' => 'require',
        'lat' => 'require',
        'address' => 'require',
        'work_id' => 'require',
        'master_worker_id' => 'require',
    ];


    protected $message = [
        'id.require' => '请输入团队Id',
        'name.require' => '姓名不能为空',
        'age.require' => '年龄不能为空',
        'mobile.require' => '手机号不能为空',
        'lon.require' => '经纬度不能为空',
        'lat.require' => '经纬度不能为空',
        'address.require' => '地址不能为空',
        'work_id.require' => '工单Id不能为空',
        'master_worker_id.require' => '成员Id不能为空',
    ];

    public function sceneInfo(){
        return $this->only(['id']);
    }
    public function sceneAdd(){
        return $this->only(['mobile']);
    }
    public function sceneAllocation(){
        return $this->only(['work_id','master_worker_id']);
    }
}