feat: initial commit - Phase 1 & 2 core features

This commit is contained in:
hiderfong
2026-04-22 17:07:33 +08:00
commit 1773bda06b
25005 changed files with 6252106 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
from typing import Optional, List
from pydantic import BaseModel
from datetime import datetime
class DatabaseOut(BaseModel):
id: int
source_id: int
name: str
charset: Optional[str] = None
table_count: int = 0
created_at: datetime
class Config:
from_attributes = True
class DataTableOut(BaseModel):
id: int
database_id: int
name: str
comment: Optional[str] = None
row_count: int = 0
column_count: int = 0
created_at: datetime
class Config:
from_attributes = True
class DataColumnOut(BaseModel):
id: int
table_id: int
name: str
data_type: Optional[str] = None
length: Optional[int] = None
comment: Optional[str] = None
is_nullable: bool = True
sample_data: Optional[str] = None
created_at: datetime
class Config:
from_attributes = True
class MetadataTreeNode(BaseModel):
id: int
name: str
type: str # source, database, table, column
children: Optional[List["MetadataTreeNode"]] = None
meta: Optional[dict] = None