AgentEventResource.php 552 B

123456789101112131415161718192021222324252627
  1. <?php
  2. namespace App\Http\Resources\V3;
  3. use App\Models\AgentEvent;
  4. use Illuminate\Http\Request;
  5. /**
  6. * 一条隐式信号的回执。
  7. *
  8. * @mixin AgentEvent
  9. */
  10. class AgentEventResource extends BaseResource
  11. {
  12. /**
  13. * @param Request $request
  14. * @return array{message_id: string, kind: string, created_at: string}
  15. */
  16. public function toArray($request): array
  17. {
  18. return [
  19. 'message_id' => $this->message_id,
  20. 'kind' => $this->kind,
  21. 'created_at' => $this->created_at,
  22. ];
  23. }
  24. }