muryshev's picture
init
57cf043
raw
history blame
662 Bytes
from datetime import datetime
from typing import Optional
from pydantic import BaseModel
class AcronymCollectionResponse(BaseModel):
collection_id: int
collection_name: str
collection_filename: str
updated_at: Optional[datetime]
acronyms: dict[str, list[str]]
class Config:
from_attributes = True
json_schema_extra = {
'example': {
'collection_id': 1,
'collection_name': 'default',
'collection_filename': '',
'updated_at': '2024-01-01T00:00:00',
'acronyms': {'AB': ['Alpha Beta', 'Alpha Beta Gamma']},
}
}