from uuid import UUID from typing import Optional from datetime import datetime from pydantic import BaseModel, Field # ---------- REQUEST ---------- class TenantCreate(BaseModel): tenant_name: str = Field(..., min_length=3, max_length=100) notes: Optional[str] = None # ---------- UPDATE (OPTIONAL) ---------- class TenantUpdate(BaseModel): tenant_name: Optional[str] = Field(None, min_length=3, max_length=100) notes: Optional[str] = None # ---------- RESPONSE ---------- class TenantResponse(BaseModel): tenant_id: UUID tenant_name: str created_at: datetime date_modified: datetime notes: Optional[str] = None class Config: from_attributes = True # Pydantic v2 (ORM support)