Introduced pkg modules for environment config, logging, and startup initialization. Replaced direct config and logging setup in main.py with modularized functions. Updated database and migration modules to use environment variables and improved DEBUG handling. Removed tool.py and migrated password utilities to pkg. Cleaned up legacy comments and unused code in models and routes.
9 lines
336 B
Python
9 lines
336 B
Python
from sqlmodel import Field
|
|
from .base import TableBase
|
|
|
|
class Setting(TableBase, table=True):
|
|
|
|
type: str = Field(index=True, nullable=False, description="设置类型")
|
|
name: str = Field(primary_key=True, nullable=False, description="设置名称") # name 为唯一主键
|
|
value: str | None = Field(description="设置值")
|