Automated Action b3827bf6b3 Add complete FastAPI delivery business backend
- Created customer, driver, and order models with SQLAlchemy
- Implemented CRUD API endpoints for all entities
- Set up SQLite database with Alembic migrations
- Added health check and base URL endpoints
- Configured CORS middleware for all origins
- Updated README with comprehensive documentation
2025-06-27 09:19:00 +00:00

26 lines
574 B
Python

from pydantic import BaseModel, EmailStr
from datetime import datetime
from typing import Optional
class CustomerBase(BaseModel):
name: str
email: EmailStr
phone: str
address: str
class CustomerCreate(CustomerBase):
pass
class CustomerUpdate(BaseModel):
name: Optional[str] = None
email: Optional[EmailStr] = None
phone: Optional[str] = None
address: Optional[str] = None
class Customer(CustomerBase):
id: int
created_at: datetime
updated_at: Optional[datetime] = None
class Config:
from_attributes = True