- Initialize project with uv, FastAPI, and libsql-client for Turso persistence - Implement local SQLite fallback (`file:local.db`) for zero-friction development and testing - Create schema and seeder with 9 therapy services from Armonía del Ser flyer - Implement POST /bookings with automatic WhatsApp deep-link generation and SPEI instructions - Implement POST /payments/verify 1-tap admin acknowledgment flow - Add automated test suite with 5 passing tests and verification gates (ruff, pyright, pytest)
27 lines
616 B
Python
27 lines
616 B
Python
from __future__ import annotations
|
|
|
|
from typing import Literal
|
|
|
|
from pydantic import BaseModel, Field
|
|
|
|
PaymentMethod = Literal["SPEI", "OXXO", "CASH"]
|
|
PaymentStatus = Literal["PENDING", "VERIFIED", "REJECTED"]
|
|
|
|
|
|
class PaymentVerificationRequest(BaseModel):
|
|
booking_id: str
|
|
amount_mxn: int = Field(..., ge=0)
|
|
payment_method: PaymentMethod = "SPEI"
|
|
notes: str | None = None
|
|
|
|
|
|
class PaymentRead(BaseModel):
|
|
id: str
|
|
booking_id: str
|
|
amount_mxn: int
|
|
payment_method: PaymentMethod
|
|
status: PaymentStatus
|
|
verified_at: str | None = None
|
|
notes: str | None = None
|
|
created_at: str
|