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.
47 lines
1.1 KiB
47 lines
1.1 KiB
<?php
|
|
|
|
namespace addons\qingdong\validate;
|
|
|
|
|
|
use think\Validate;
|
|
|
|
class Record extends Validate {
|
|
/**
|
|
* 验证规则
|
|
*/
|
|
protected $rule = [
|
|
'follow_type' => 'require|max:32',
|
|
'relation_type' => 'require|number|between:1,5',
|
|
'relation_id' => 'require|number',
|
|
'content' => 'max:250',
|
|
'follow_time' => 'date',
|
|
'next_time' => 'date',
|
|
'reminds_id' => 'max:255',
|
|
'follow' => 'max:32',
|
|
'create_staff_id' => 'require|number',
|
|
];
|
|
/**
|
|
* 提示消息
|
|
*/
|
|
protected $message = [];
|
|
/**
|
|
* 字段描述
|
|
*/
|
|
protected $field = [
|
|
'create_staff_id' => '员工',
|
|
'follow_type' => '跟进类型',
|
|
'follow_time' => '跟进时间',
|
|
'follow' => '跟进状态',
|
|
'content' => '跟进内容',
|
|
'next_time' => '下次跟进时间',
|
|
'relation_type' => '关联类型',
|
|
'relation_id' => '关联类型ID',
|
|
];
|
|
/**
|
|
* 验证场景
|
|
*/
|
|
protected $scene = [
|
|
'create' => ['follow_type', 'follow_time', 'content', 'next_time', 'relation_type', 'relation_id', 'follow'],
|
|
'edit' => [],
|
|
];
|
|
}
|
|
|