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.
97 lines
2.0 KiB
Python
97 lines
2.0 KiB
Python
"""Video schemas for person identification."""
|
|
|
|
from __future__ import annotations
|
|
|
|
from datetime import date, datetime
|
|
from typing import List, Optional
|
|
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class PersonInfo(BaseModel):
|
|
"""Person information for video listings."""
|
|
|
|
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 VideoListItem(BaseModel):
|
|
"""Video item in list response."""
|
|
|
|
id: int
|
|
filename: str
|
|
path: str
|
|
date_taken: Optional[date] = None
|
|
date_added: date
|
|
identified_people: List[PersonInfo]
|
|
identified_people_count: int
|
|
|
|
|
|
class ListVideosResponse(BaseModel):
|
|
"""Response for listing videos."""
|
|
|
|
items: List[VideoListItem]
|
|
page: int
|
|
page_size: int
|
|
total: int
|
|
|
|
|
|
class VideoPersonInfo(BaseModel):
|
|
"""Person information with identification metadata."""
|
|
|
|
person_id: int
|
|
first_name: str
|
|
last_name: str
|
|
middle_name: Optional[str] = None
|
|
maiden_name: Optional[str] = None
|
|
date_of_birth: Optional[date] = None
|
|
identified_by: Optional[str] = None # Username
|
|
identified_date: datetime
|
|
|
|
|
|
class VideoPeopleResponse(BaseModel):
|
|
"""Response for getting people in a video."""
|
|
|
|
video_id: int
|
|
people: List[VideoPersonInfo]
|
|
|
|
|
|
class IdentifyVideoRequest(BaseModel):
|
|
"""Request to identify a person in a video."""
|
|
|
|
person_id: Optional[int] = None # Use existing person
|
|
first_name: Optional[str] = None # Create new person
|
|
last_name: Optional[str] = None
|
|
middle_name: Optional[str] = None
|
|
maiden_name: Optional[str] = None
|
|
date_of_birth: Optional[date] = None
|
|
|
|
|
|
class IdentifyVideoResponse(BaseModel):
|
|
"""Response for identifying a person in a video."""
|
|
|
|
video_id: int
|
|
person_id: int
|
|
created_person: bool
|
|
message: str
|
|
|
|
|
|
class RemoveVideoPersonResponse(BaseModel):
|
|
"""Response for removing a person from a video."""
|
|
|
|
video_id: int
|
|
person_id: int
|
|
removed: bool
|
|
message: str
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|