Tanya 68d280e8f5 feat: Add new analysis documents and update installation scripts for backend integration
This commit introduces several new analysis documents, including Auto-Match Load Performance Analysis, Folder Picker Analysis, Monorepo Migration Summary, and various performance analysis documents. Additionally, the installation scripts are updated to reflect changes in backend service paths, ensuring proper integration with the new backend structure. These enhancements provide better documentation and streamline the setup process for users.
2025-12-30 15:04:32 -05:00

82 lines
2.0 KiB
Python

"""People schemas for web API (Phase 3)."""
from __future__ import annotations
from datetime import date
from typing import Optional
from pydantic import BaseModel, ConfigDict, Field
class PersonResponse(BaseModel):
"""Person DTO returned from API."""
model_config = ConfigDict(from_attributes=True, protected_namespaces=())
id: int
first_name: str
last_name: str
middle_name: Optional[str] = None
maiden_name: Optional[str] = None
date_of_birth: Optional[date] = None
class PersonCreateRequest(BaseModel):
"""Request payload to create a new person."""
model_config = ConfigDict(protected_namespaces=())
first_name: str = Field(..., min_length=1)
last_name: str = Field(..., min_length=1)
middle_name: Optional[str] = None
maiden_name: Optional[str] = None
date_of_birth: Optional[date] = None
class PeopleListResponse(BaseModel):
"""List of people for selection dropdowns."""
model_config = ConfigDict(protected_namespaces=())
items: list[PersonResponse]
total: int
class PersonUpdateRequest(BaseModel):
"""Request payload to update a person."""
model_config = ConfigDict(protected_namespaces=())
first_name: str = Field(..., min_length=1)
last_name: str = Field(..., min_length=1)
middle_name: Optional[str] = None
maiden_name: Optional[str] = None
date_of_birth: Optional[date] = None
class PersonWithFacesResponse(BaseModel):
"""Person with face count for modify identified workflow."""
model_config = ConfigDict(from_attributes=True, protected_namespaces=())
id: int
first_name: str
last_name: str
middle_name: Optional[str] = None
maiden_name: Optional[str] = None
date_of_birth: Optional[date] = None
face_count: int
video_count: int
class PeopleWithFacesListResponse(BaseModel):
"""List of people with face counts."""
model_config = ConfigDict(protected_namespaces=())
items: list[PersonWithFacesResponse]
total: int