You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
31 lines
1.0 KiB
Python
31 lines
1.0 KiB
Python
from datetime import datetime
|
|
from typing import List, Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import Field
|
|
from src.models import DefaultBase, Pagination
|
|
|
|
class UploadedFileDataBase(DefaultBase):
|
|
filename: str = Field(..., nullable=False)
|
|
file_content: str = Field(..., nullable=False)
|
|
file_url: str = Field(..., nullable=False)
|
|
file_size: int = Field(..., nullable=False)
|
|
file_type: str = Field(..., nullable=False)
|
|
created_at: Optional[datetime] = Field(None, nullable=True)
|
|
updated_at: Optional[datetime] = Field(None, nullable=True)
|
|
created_by: Optional[str] = Field(None, nullable=True)
|
|
updated_by: Optional[str] = Field(None, nullable=True)
|
|
|
|
class UploadedFileDataCreate(UploadedFileDataBase):
|
|
pass
|
|
|
|
class UploadedFileDataUpdate(UploadedFileDataBase):
|
|
pass
|
|
|
|
class UploadedFileDataRead(UploadedFileDataBase):
|
|
id: UUID
|
|
wlc_version: Optional[int] = Field(None, nullable=False)
|
|
|
|
class UploadedFileDataPagination(Pagination):
|
|
items: List[UploadedFileDataRead] = []
|