23 lines
479 B
Python
23 lines
479 B
Python
from datetime import datetime
|
|
from typing import Optional
|
|
from pydantic import BaseModel, ConfigDict
|
|
|
|
|
|
class AttachmentOut(BaseModel):
|
|
model_config = ConfigDict(from_attributes=True)
|
|
|
|
id: int
|
|
entity_type: str
|
|
entity_id: int
|
|
original_name: str
|
|
mime_type: str
|
|
size_bytes: int
|
|
uploaded_by_id: int
|
|
uploaded_by_name: Optional[str] = None
|
|
uploaded_at: datetime
|
|
|
|
|
|
class AttachmentListOut(BaseModel):
|
|
items: list[AttachmentOut]
|
|
total: int
|