Blame view

addons/antis/validate/Record.php 1.11 KB
2db47680   hexiaodong   chore: 初始提交 php 遗...
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
  <?php

  

  namespace addons\antis\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'   => [],

  	];

  }