Leads.php
1.42 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<?php
namespace addons\antis\validate;
use think\Validate;
class Leads extends Validate {
/**
* 验证规则
*/
protected $rule = [
'create_staff_id' => 'require|number',
'owner_staff_id' => 'require|number',
'name' => 'require|max:50',
'sex' => 'between:0,2',
'level' => 'number|between:1,5',
'telephone' => 'max:32',
'mobile' => 'max:32',
'industry' => 'max:50',
'source' => 'max:50',
'follow' => 'max:50',
'address' => 'max:50',
'address_detail' => 'max:50',
'remarks' => 'max:250',
];
/**
* 提示消息
*/
protected $message = [];
/**
* 字段描述
*/
protected $field = [
'create_staff_id' => '员工',
'owner_staff_id' => '员工',
'name' => '线索名称',
'sex' => '性别',
'telephone' => '电话',
'mobile' => '手机号',
'industry' => '所属行业',
'level' => '客户星级',
'follow' => '客户状态',
'source' => '客户来源',
'address' => '所在地区',
'address_detail' => '详细地址',
'remark' => '备注',
];
/**
* 验证场景
*/
protected $scene = [
'create' => ['name', 'sex', 'telephone', 'mobile', 'industry', 'level', 'follow', 'source', 'address', 'address_detail', 'remark'],
'edit' => [],
];
}