<?php
// +----------------------------------------------------------------------
// | saiadmin [ saiadmin快速开发框架 ]
// +----------------------------------------------------------------------
// | Author: your name
// +----------------------------------------------------------------------
namespace app\dice\validate\ante_config;

use plugin\saiadmin\basic\BaseValidate;

/**
 * 底注配置验证器
 */
class DiceAnteConfigValidate extends BaseValidate
{
    protected $rule = [
        'name'       => 'require|max:64',
        'title'      => 'require|max:255',
        'is_default' => 'require|in:0,1',
        'mult'       => 'require|integer|gt:0',
    ];

    protected $message = [
        'name'       => '名称必须填写',
        'title'      => '标题必须填写',
        'is_default' => '默认底注标记必须为 0 或 1',
        'mult'       => '底注倍率必须为大于 0 的整数',
    ];

    protected $scene = [
        'save' => ['name', 'title', 'is_default', 'mult'],
        'update' => ['name', 'title', 'is_default', 'mult'],
    ];
}
