phase-2: asset register, detail overview, asset picker, attachments
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
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
|
||||
Reference in New Issue
Block a user