2
0

StoreAgentChargeRequest.php 676 B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Http\Requests\V3;
  3. use Illuminate\Foundation\Http\FormRequest;
  4. /**
  5. * `POST /v3/agent-charges` 的入参:agent 服务在一次提问开始前为它扣费。
  6. */
  7. class StoreAgentChargeRequest extends FormRequest
  8. {
  9. public function authorize(): bool
  10. {
  11. return true;
  12. }
  13. /**
  14. * @return array<string, array<int, mixed>>
  15. */
  16. public function rules(): array
  17. {
  18. return [
  19. 'run_id' => ['required', 'uuid'],
  20. 'thread_id' => ['nullable', 'uuid'],
  21. 'deep' => ['boolean'],
  22. 'device_id' => ['nullable', 'uuid'],
  23. 'client_ip' => ['nullable', 'ip'],
  24. ];
  25. }
  26. }