More needed models

This commit is contained in:
Andrew 2023-04-12 01:17:20 +07:00
parent 014d759961
commit c1e8cbf5b3

View file

@ -1,7 +1,13 @@
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] = []
@ -24,3 +30,19 @@ class ColumnDefinition(BaseModel):
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