User Types
All users connect to auth.User:
- PetOwner: Optional 1:1 link (created lazily)
- Veterinarian: Required 1:1 link to User
- Staff: Direct Django users with
is_staff=True
Architecture & Data Model Documentation
High-level entity relationships without field details. Shows the main actors, workflow, and data flow.
Django apps structure: mascotas, productos, solicitudes, common, payments, and external integrations.
| Task | App | Purpose |
|---|---|---|
send_veterinarian_followup |
solicitudes | Re-sends availability request to vet if still pending |
run_payment_reminder_cron |
solicitudes | Cron job to send payment reminders |
create_vetvisit_in_sheet |
mascotas | Creates row in Google Sheets for visit |
update_vetvisit_in_sheet |
mascotas | Updates Google Sheets row |
create_event_calendar_vetvisit |
mascotas | Creates Google Calendar event |
update_event_calendar_vetvisit |
mascotas | Updates Google Calendar event |
create_user_owner |
mascotas | Creates Django user for PetOwner + welcome email |
generate_vetvisit_invoice |
mascotas | Generates AFIP invoice and PDF |
fetch_mp_notification_details |
payments | Fetches MercadoPago webhook details |
Celery handles async operations: external APIs (Google, MercadoPago, AFIP), scheduled reminders, and heavy processing (invoices, emails).
Next.js 13+ App Router structure with public pages, backoffice, shared components, and services layer.
Complete entity-relationship diagram with all fields, types, and relationships.
deleted flag on most modelsStateHistory for service requestsPricesAll users connect to auth.User:
is_staff=TruePetOwner → Cart → ServiceRequest → VeterinarianAsked → VetVisit → Report
State Machine:
neighborhood.distance_coefficientPrices.veterinarian_idIndividualTurnFeeGroupDiscounts model