Record.php 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. namespace addons\qingdongams\validate;
  3. use think\Validate;
  4. class Record extends Validate {
  5. /**
  6. * 验证规则
  7. */
  8. protected $rule = [
  9. 'follow_type' => 'require|max:32',
  10. 'relation_type' => 'require|number|between:1,5',
  11. 'relation_id' => 'require|number',
  12. 'content' => 'max:250',
  13. 'follow_time' => 'date',
  14. 'next_time' => 'date',
  15. 'reminds_id' => 'max:255',
  16. 'follow' => 'max:32',
  17. 'create_staff_id' => 'require|number',
  18. ];
  19. /**
  20. * 提示消息
  21. */
  22. protected $message = [];
  23. /**
  24. * 字段描述
  25. */
  26. protected $field = [
  27. 'create_staff_id' => '员工',
  28. 'follow_type' => '跟进类型',
  29. 'follow_time' => '跟进时间',
  30. 'follow' => '跟进状态',
  31. 'content' => '跟进内容',
  32. 'next_time' => '下次跟进时间',
  33. 'relation_type' => '关联类型',
  34. 'relation_id' => '关联类型ID',
  35. ];
  36. /**
  37. * 验证场景
  38. */
  39. protected $scene = [
  40. 'create' => ['follow_type', 'follow_time', 'content', 'next_time', 'relation_type', 'relation_id', 'follow'],
  41. 'edit' => [],
  42. ];
  43. }