Gbook.php 975 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. namespace app\api\validate;
  3. use think\Validate;
  4. class Gbook extends Validate
  5. {
  6. protected $rule = [
  7. 'offset' => 'number|between:0,' . PHP_INT_MAX,
  8. 'limit' => 'number|between:1,500',
  9. 'id' => 'number|between:1,' . PHP_INT_MAX,
  10. 'rid' => 'number|between:1,' . PHP_INT_MAX,
  11. 'user_id' => 'number|between:1,' . PHP_INT_MAX,
  12. 'status' => 'number|between:0,10',
  13. 'name' => 'max:20',
  14. 'content' => 'max:20',
  15. 'orderby' => 'in:id,time,reply_time',
  16. 'time_start' => 'number|between:0,' . PHP_INT_MAX,
  17. 'time_end' => 'number|between:0,' . PHP_INT_MAX,
  18. ];
  19. protected $message = [
  20. ];
  21. protected $scene = [
  22. 'get_list' => [
  23. 'offset',
  24. 'limit',
  25. 'id',
  26. 'rid',
  27. 'user_id',
  28. 'status',
  29. 'name',
  30. 'orderby',
  31. ],
  32. ];
  33. }