48 lines
804 B
Python
48 lines
804 B
Python
from typing import Any
|
|
from uuid import UUID
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class AuthModel(BaseModel):
|
|
username: str
|
|
password: str
|
|
|
|
|
|
class ItemsFieldSelectorList(BaseModel):
|
|
fields: list[str] = []
|
|
|
|
|
|
class ColumnsDefinitionList(BaseModel):
|
|
columns: list[str]
|
|
|
|
|
|
class UserDefinition(BaseModel):
|
|
username: str
|
|
password: str
|
|
|
|
|
|
class ColumnDefinition(BaseModel):
|
|
name: str
|
|
value: Any
|
|
isString: bool = False
|
|
isLike: bool = True
|
|
|
|
|
|
class ItemDeletionDefinitionList(BaseModel):
|
|
defs: list[ColumnDefinition]
|
|
|
|
|
|
class TableDefinition(BaseModel):
|
|
table_id: UUID
|
|
table_name: str
|
|
columns: str
|
|
system: bool
|
|
hidden: bool
|
|
|
|
|
|
class TableListDefinition(BaseModel):
|
|
tables: list[TableDefinition]
|
|
|
|
|
|
class ErrorResponseDefinition(BaseModel):
|
|
error: str
|