<?php  namespace  App\Http\Requests\Manager;

use App\Http\Requests\BaseRequest;

/**
 * SCRM公司管理验证
 * @author  liuxaingxin
 *
 * */
class ScrmCompany extends BaseRequest{

    /**
     *
     * @return  array
     */
    public  function  rules(){
        return [
            'company_id'  =>  'required',
            'corpid'  =>  'required',
            'page'  =>  'required|integer|min:1',
            'limit'  =>  'required|integer|min:1',
        ];
    }

    // 场景列表
    protected   $scenes         = [
		'bind'  		        => ['company_id','corpid'],
        'unbind'  		        => ['company_id'],
        'list'  		        => ['page','limit'],
	];

    /**
     *
     * @return  array
     */
    public  function  messages(){
        return [
            'company_id.required'   =>  '请选择公司',
            'corpid.required'       =>  '请输入corpid',
            'page.required'         =>  '请输入页码',
            'page.integer'          =>  '页码必须为整数',
            'page.min'              =>  '页码不能小于1',
            'limit.required'        =>  '请输入每页数量',
            'limit.integer'         =>  '每页数量必须为整数',
            'limit.min'             =>  '每页数量不能小于1',
        ];
    }

}
