feat: add full project - backend, frontend, docker, specs and configs
This commit is contained in:
parent
b77c7d5a01
commit
e6cb06255b
24489 changed files with 61341 additions and 36 deletions
61
.specify/features/006-client-area/contracts/me-visits.md
Normal file
61
.specify/features/006-client-area/contracts/me-visits.md
Normal file
|
|
@ -0,0 +1,61 @@
|
|||
# Contract: GET /api/v1/me/visits
|
||||
|
||||
**Blueprint**: `client_bp`
|
||||
**Auth**: JWT Bearer — `require_auth` — ClientUser only
|
||||
|
||||
---
|
||||
|
||||
## Request
|
||||
|
||||
```
|
||||
GET /api/v1/me/visits
|
||||
Authorization: Bearer <jwt_token>
|
||||
```
|
||||
|
||||
Sem parâmetros de query ou corpo.
|
||||
|
||||
---
|
||||
|
||||
## Response 200 OK
|
||||
|
||||
```json
|
||||
[
|
||||
{
|
||||
"id": "b3fc85f6-1234-4562-b3fc-2c963f66af11",
|
||||
"property": {
|
||||
"id": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
||||
"title": "Apartamento 3 quartos Jardins",
|
||||
"slug": "apartamento-3-quartos-jardins"
|
||||
},
|
||||
"message": "Gostaria de visitar no final de semana.",
|
||||
"status": "pending",
|
||||
"scheduled_at": null,
|
||||
"created_at": "2026-04-13T10:00:00Z"
|
||||
},
|
||||
{
|
||||
"id": "c4ad96g7-5678-5673-c4gd-3d074g77bg22",
|
||||
"property": {
|
||||
"id": "4gb96g75-6828-5673-c4gd-3d074g77bg33",
|
||||
"title": "Casa 4 quartos Alphaville",
|
||||
"slug": "casa-4-quartos-alphaville"
|
||||
},
|
||||
"message": "Tenho interesse em visitar esta semana.",
|
||||
"status": "confirmed",
|
||||
"scheduled_at": "2026-05-01T10:00:00Z",
|
||||
"created_at": "2026-04-10T08:30:00Z"
|
||||
}
|
||||
]
|
||||
```
|
||||
|
||||
Ordenado por `created_at DESC`. Lista vazia `[]` quando sem visitas.
|
||||
|
||||
`property` pode ser `null` se o imóvel foi removido do banco.
|
||||
`scheduled_at` é `null` enquanto status for `pending`.
|
||||
|
||||
---
|
||||
|
||||
## Response 401 Unauthorized
|
||||
|
||||
```json
|
||||
{ "error": "Token inválido ou ausente" }
|
||||
```
|
||||
Loading…
Add table
Add a link
Reference in a new issue