<?php
namespace app\products\validate;
use app\common\validate\BaseValidate;
class Car extends BaseValidate
{
    protected $rule = [
        'vehicleNo' => 'require',
        'frameNo' => 'require',
        'cityCode' => 'require',
        'vehicleName' => 'require',
        'modelName'=>'require',
        'email'=>'require',
        //车辆信息
        'licenseNo'=>'require',
        'engNo'=>'require',
        'brndCode'=>'require',
        'registerDate'=>'require',
        'chgownerFlag'=>'require',
        'transferDate'=>'require',
        'vhlVal'=>'require',
        //车主信息
        'drvOwner'=>'require',
        'certiType'=>'require',
        'certiCode'=>'require',
        'certiTel'=>'require',
        //投保人
        'appName'=>'require',
        'appCertType'=>'require',
        'appCertNo'=>'require',
        'appTel'=>'require',
        //被保人
        'insuredName'=>'require',
        'insuredCertType'=>'require',
        'insuredCertNo'=>'require',
        'insuredTel'=>'require',
        //base
//        'cityCode'=>'require',
        'xz'=>'require',//保险险种
        //核保数据校验
        'calAppNo'=>'require',
//        'appName'=>'require',
//        'appCertType'=>'require',
//        'appCertNo'=>'require',
//        'appTel'=>'require',
        'appAddr'=>'require',
        'appEmail'=>'require',
        'insrntName'=>'require',
        'insrntCertType'=>'require',
        'insrntCertNo'=>'require',
        'insrntTel'=>'require',
        'insrntAddr'=>'require',
//        'email'=>'require',
        //支付数据校验
        'syAppNo'=>'require',
        'syAmount'=>'require',
        'syAppName'=>'require',
        'jqAppNo'=>'require',
        'jqAmount'=>'require',
        'jqAppName'=>'require',
    ];
    protected $message = [
        "vehicleNo.require" => "车牌必须,新车未上牌时传 *-*",
        "frameNo.require" => "车架号必传",
        "vehicleName.require" => "车型名称必传",
        'cityCode.require' => '行政区域代码必传',
        'modelName.require' => '车型名称必传',
        'email.require' => '邮箱必传',
        //车辆信息
        "licenseNo.require" => "车牌必须,新车未上牌时传 *-*",
        "engNo.require" => "发动机号必传",
        "brndCode.require" => "厂牌车型代码必传",
        "registerDate.require" => "初次登记日期必传",
        "chgownerFlag.require" => "过户车标志必传",
        "transferDate.require" => "转移登记日期必传",
        "vhlVal.require" => "新车购置价必传",
        //车主信息
        "drvOwner.require" => "行驶证车主必传",
        "certiType.require" => "车主证件类型必传",
        "certiCode.require" => "车主证件号码必传",
        "certiTel.require" => "车主电话号码必传",
        //投保人
        "appName.require" => "投保人姓名必传",
        "appCertType.require" => "投保人证件类型必传",
        "appCertNo.require" => "投保人证件号码必传",
        "appTel.require" => "投保人联系人电话必传",
        //被保人
        "insuredName.require" => "被保险人姓名必传",
        "insuredCertType.require" => "被保人证件类型必传",
        "insuredCertNo.require" => "被保人证件号码必传",
        "insuredTel.require" => "被保险人电话必传",
        //险种信息
        "xz.require" => "险种信息必传",
        //核保信息检验
        "calAppNo.require" => "报价单号必传",
        "appAddr.require" => "投保人地址必传",
        "appEmail.require" => "投保人邮箱必传",
        "insrntName.require" => "被保险人姓名必传",
        "insrntCertType.require" => "被保人证件类型必传",
        "insrntCertNo.require" => "被保人证件号码必传",
        "insrntTel.require" => "被保险人电话必传",
        "insrntAddr.require" => "被保险人地址必传",

        //支付信息检验
        "syAppNo.require" => "商业险投报保(批)单号必传",
        "syAmount.require" => "商业险保单金额必传",
        "syAppName.require" => "商业险投保人名称必传",
        "jqAppNo.require" => "交强险投报保(批)单号必传",
        "jqAmount.require" => "交强险保单金额必传",
        "jqAppName.require" => "交强险投保人名称必传",
    ];
    protected $scene = [
        "carmodel" => ["vehicleNo", "frameNo", "vehicleName", "cityCode"],
        "premium"=>["cityCode","licenseNo","frameNo","engNo","brndCode","registerDate","chgownerFlag","transferDate","vhlVal","drvOwner","certiType","certiCode","certiTel","appName","appCertType","appCertNo","appTel","insuredName","insuredCertType","insuredCertNo","insuredTel","xz"],
        "underwrite"=>["calAppNo","appName","appCertType","appCertNo","appTel","appAddr","appEmail","insrntName","insrntCertType","insrntCertNo","insrntTel","insrntAddr","email"],
        "pay"=>["syAppNo","syAmount","syAppName","jqAppNo","jqAmount","jqAppName"]
    ];
}