File size: 662 Bytes
57cf043
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
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']},
            }
        }