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.
45 lines
1.2 KiB
Python
45 lines
1.2 KiB
Python
from datetime import datetime
|
|
from typing import List, Optional
|
|
from uuid import UUID
|
|
|
|
from pydantic import Field
|
|
from src.models import CommonParams, DefaultBase, Pagination
|
|
|
|
class UploadedFileDataBase(DefaultBase):
|
|
filename: str = Field(...)
|
|
file_content: str = Field(...)
|
|
file_url: str = Field(...)
|
|
file_size: int = Field(...)
|
|
file_type: str = Field(...)
|
|
created_at: Optional[datetime] = Field(None)
|
|
updated_at: Optional[datetime] = Field(None)
|
|
created_by: Optional[str] = Field(None)
|
|
updated_by: Optional[str] = Field(None)
|
|
|
|
class UploadedFileDataCreate(UploadedFileDataBase):
|
|
pass
|
|
|
|
class UploadedFileDataUpdate(UploadedFileDataBase):
|
|
pass
|
|
|
|
class UploadedFileDataRead(UploadedFileDataBase):
|
|
id: UUID
|
|
wlc_version: Optional[int] = Field(None)
|
|
|
|
class UploadedFileDataPagination(Pagination):
|
|
items: List[UploadedFileDataRead] = []
|
|
|
|
|
|
class ListQueryParams(CommonParams):
|
|
items_per_page: Optional[int] = Field(
|
|
default=5,
|
|
ge=1,
|
|
le=1000,
|
|
description="Number of items per page",
|
|
alias="itemsPerPage",
|
|
)
|
|
search: Optional[str] = Field(
|
|
default=None,
|
|
description="Search keyword",
|
|
)
|