InviteNewUsersRewardRequest.php 961 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. <?php
  2. /**
  3. *
  4. *
  5. * @category xxx
  6. * @package PSR
  7. * @subpackage Documentation\API
  8. * @author xxx <xxx@xxx.com>
  9. * @license GPL https://xxx.com
  10. * @link https://xxx.com
  11. * @ctime: 2020/4/16 10:54
  12. */
  13. namespace App\Http\Requests;
  14. use App\Models\InviteNewUsersGiveGiftLog;
  15. use App\Validators\Rules;
  16. use Illuminate\Validation\Rule;
  17. class InviteNewUsersRewardRequest extends FormRequest
  18. {
  19. public function rules()
  20. {
  21. return [
  22. 'invite_new_users_configs_id' => Rules::id,
  23. 'num' => 'required',
  24. 'gift_type' => [
  25. 'required',
  26. Rule::in([
  27. InviteNewUsersGiveGiftLog::GIFT_TYPE_BALANCE,
  28. InviteNewUsersGiveGiftLog::GIFT_TYPE_CARD,
  29. InviteNewUsersGiveGiftLog::GIFT_TYPE_COUPON,
  30. ]),
  31. ],
  32. 'gift_id' => 'required',
  33. 'gift_num' => 'required',
  34. ];
  35. }
  36. }