saveinmed/backend/internal/http/handler
Tiago Yamamoto 4bb848788f feat: tenant model, seeder, and product search with distance
Tenant Model:
- Renamed Company→Tenant (Company alias for compatibility)
- Added: lat/lng, city, state, category
- Updated: postgres, handlers, DTOs, schema SQL

Seeder (cmd/seeder):
- Generates 400 pharmacies in Anápolis/GO
- 20-500 products per tenant
- Haversine distance variation ±5km from center

Product Search:
- GET /products/search with advanced filters
- Filters: price (min/max), expiration, distance
- Haversine distance calculation (approx km)
- Anonymous seller (only city/state shown until checkout)
- Ordered by expiration date (nearest first)

New domain types:
- ProductWithDistance, ProductSearchFilter, ProductSearchPage
- HaversineDistance function

Updated tests for Category instead of Role
2025-12-20 09:03:13 -03:00
..
cart_handler.go refactor(handler): extract order and cart handlers 2025-12-20 08:06:07 -03:00
company_handler.go feat: tenant model, seeder, and product search with distance 2025-12-20 09:03:13 -03:00
dashboard_handler.go refactor(handler): complete package decomposition - 92% extracted 2025-12-20 08:10:56 -03:00
dto.go feat: tenant model, seeder, and product search with distance 2025-12-20 09:03:13 -03:00
handler.go feat: tenant model, seeder, and product search with distance 2025-12-20 09:03:13 -03:00
handler_test.go feat: tenant model, seeder, and product search with distance 2025-12-20 09:03:13 -03:00
order_handler.go feat(pagination): add pagination to all list endpoints 2025-12-20 08:37:59 -03:00
payment_handler.go refactor(handler): complete package decomposition - 92% extracted 2025-12-20 08:10:56 -03:00
product_handler.go feat: tenant model, seeder, and product search with distance 2025-12-20 09:03:13 -03:00
user_handler.go refactor(handler): complete package decomposition - 92% extracted 2025-12-20 08:10:56 -03:00