CustomerGroupPosting.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. <?php
  2. namespace App\Http\Requests\OpenWork\Statistics;
  3. use App\Http\Requests\BaseRequest;
  4. /**
  5. * 客户群群发校验规则
  6. * @author 唐远望
  7. * @date 2025-08-13
  8. * */
  9. class CustomerGroupPosting extends BaseRequest
  10. {
  11. /**
  12. *
  13. * @return array
  14. */
  15. public function rules()
  16. {
  17. // 规则
  18. return [
  19. 'corpid' => 'required',
  20. 'moment_id' => 'required',
  21. 'limit' => 'integer',
  22. 'id' => 'required|integer',
  23. 'userid' => 'required',
  24. ];
  25. }
  26. // 场景列表
  27. protected $scenes = [
  28. 'sendStatistics' => ['corpid','id'],
  29. 'sendUserList' => ['corpid','id','limit'],
  30. 'groupPostUserList' => ['corpid','id','limit','userid'],
  31. 'receiveUserList' => ['corpid','id','limit'],
  32. ];
  33. /**
  34. *
  35. * @return array
  36. */
  37. public function messages()
  38. {
  39. return [
  40. 'corpid.required' => '授权方corpid不能为空',
  41. 'limit.integer' => '每页记录数必须为整数',
  42. 'id.required' => '模板ID不能为空',
  43. 'id.integer' => '模板ID格式错误',
  44. 'userid.required' => '群主用户ID不能为空',
  45. ];
  46. }
  47. }