<?php


namespace app\products\validate;


use app\common\validate\BaseValidate;

class Gas extends BaseValidate
{
    protected $rule = ['amount' => 'require|number',
        'goods_name' => 'require',
        'itemDesc' => 'require',
        'user_name' => 'require',
        'certificateType' => 'require',
        'certificateNo' => 'require',
        'address' => 'require',
        'email' => 'require',
        'mobileTelephone' => 'require',
        'insuranceBeginDate' => 'require',
        'insuranceEndDate' => 'require',
        'productPackageType' => 'require',
        'gasType' => 'require',
        'contractType' => 'require',
        "code" => "require",
    ];
    protected $message = [
        'amount.require' => '产品价格不能为空',
        'amount.number' => '产品价格格式错误',
        'goods_name.require' => '商品名称不能为空',
        'itemDesc.require' => '商品描述不能为空',
        'user_name.require' => '投保人信息不能为空',
        'certificateType.require' => '证件类型不能为空',
        'certificateNo.require' => '证件号不能为空',
        'address.require' => '地址不能为空',
        'email.require' => '邮箱不能为空',
        'mobileTelephone.require' => '联系电话不能为空',
        'insuranceBeginDate.require' => '保险起期不能为空',
        'insuranceEndDate.require' => '保险止期不能为空',
        'productPackageType.require' => '套餐方案不能为空',
        'gasType.require' => '燃气类型不能为空',
        'contractType.require' => '被保人类型不能为空',
        "code.require" => "推广码不能为空",
    ];
    protected $scene = [
        "add_order" => ["goods_name", "itemDesc", "user_name", "certificateType", "certificateNo", "address", "email", "mobileTelephone", "insuranceBeginDate", "insuranceEndDate", "productPackageType", "gasType", "contractType","code"]
    ];
}