perf: System variables are set as user-selectable attributes

This commit is contained in:
fit2cloud-chenyw
2026-03-17 12:31:29 +08:00
committed by fit2cloud-chenyw
parent 24d5f2a3d5
commit 8b8cd3e8c9
+6 -2
View File
@@ -1,4 +1,4 @@
from typing import List
from typing import List, Optional
from sqlalchemy import Column, BigInteger
from sqlalchemy.dialects.postgresql import JSONB
@@ -19,7 +19,11 @@ class BaseUserPO(SQLModel):
origin: int = Field(nullable=False, default=0)
create_time: int = Field(default_factory=get_timestamp, sa_type=BigInteger(), nullable=False)
language: str = Field(max_length=255, default="zh-CN")
system_variables: List = Field(sa_column=Column(JSONB, nullable=True))
#system_variables: List = Field(sa_column=Column(JSONB, nullable=True))
system_variables: Optional[List] = Field(
default=None,
sa_column=Column(JSONB, nullable=True)
)
class UserModel(SnowflakeBase, BaseUserPO, table=True):