Refactor config, logging, and startup structure
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.
This commit is contained in:
@@ -1,16 +1,6 @@
|
||||
# model/setting.py
|
||||
from sqlmodel import Field
|
||||
from .base import TableBase
|
||||
|
||||
"""
|
||||
原表:
|
||||
CREATE TABLE IF NOT EXISTS fr_settings (
|
||||
type TEXT,
|
||||
name TEXT PRIMARY KEY,
|
||||
value TEXT
|
||||
)
|
||||
"""
|
||||
|
||||
class Setting(TableBase, table=True):
|
||||
|
||||
type: str = Field(index=True, nullable=False, description="设置类型")
|
||||
|
||||
Reference in New Issue
Block a user