mirror of
https://gh-proxy.org/https://github.com/klinsmaya/SQLBot.git
synced 2026-11-08 01:06:59 +08:00
perf: System variables are set as user-selectable attributes
This commit is contained in:
committed by
fit2cloud-chenyw
parent
24d5f2a3d5
commit
8b8cd3e8c9
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user