<?php
/**
 * @copyright   Copyright (c) 2017 https://www.sapixx.com All rights reserved.
 * @license     Licensed (http://www.apache.org/licenses/LICENSE-2.0).
 * @author      pillar<ltmn@qq.com>
 * 应用配置
 */
namespace app\ais\validate;
use think\Validate;

class Config extends Validate{

    protected $rule = [
        'info'             => 'require|array',
        'service_telephone' => 'require',
        'coupon_is_pay_open'=> 'require|number|between: 0,100',
    ];

    protected $message = [
        'info'               => '置顶信息必须设置',
        'service_telephone'  => '客服电话必须填写',
        'coupon_is_pay_open' => '优惠券过期时间必须填写,(0-100)之间',
    ];

    protected $scene = [
        'info'   => ['info'],
        'writer' => ['shore_img','shore_text','mch_text','mch_qrcode'], //文案
        'save'   => ['service_telephone','coupon_is_pay_open'],
    ];
}