You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
842 B
41 lines
842 B
<?php
|
|
|
|
namespace addons\qingdong\validate;
|
|
|
|
use think\Validate;
|
|
|
|
class Consume extends Validate {
|
|
/**
|
|
* 验证规则
|
|
*/
|
|
protected $rule = [
|
|
'customer_id' => 'require|number',
|
|
'consume_type' => 'max:64',
|
|
'consume_time' => 'date',
|
|
'money' => 'number',
|
|
'check_status' => 'number|between:0,5',
|
|
'remark' => 'max:250',
|
|
];
|
|
/**
|
|
* 提示消息
|
|
*/
|
|
protected $message = [];
|
|
/**
|
|
* 字段描述
|
|
*/
|
|
protected $field = [
|
|
'customer_id' => '客户',
|
|
'consume_type' => '消费方式',
|
|
'consume_time' => '消费日期',
|
|
'money' => '消费金额',
|
|
'check_status' => '审核状态',
|
|
'remark' => '备注',
|
|
];
|
|
/**
|
|
* 验证场景
|
|
*/
|
|
protected $scene = [
|
|
'create' => ['customer_id', 'consume_type', 'consume_time', 'money', 'check_status', 'remark'],
|
|
'edit' => [],
|
|
];
|
|
}
|
|
|