初始提交:极码 GeekCode 全栈项目(FastAPI + Vue3)
This commit is contained in:
15
backend/models/system_config.py
Normal file
15
backend/models/system_config.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""系统配置模型 - 键值对存储"""
|
||||
from sqlalchemy import Column, Integer, String, Text, DateTime
|
||||
from sqlalchemy.sql import func
|
||||
from database import Base
|
||||
|
||||
|
||||
class SystemConfig(Base):
|
||||
"""系统配置表 - 存储OSS等系统级配置"""
|
||||
__tablename__ = "system_configs"
|
||||
|
||||
id = Column(Integer, primary_key=True, index=True)
|
||||
key = Column(String(100), unique=True, index=True, nullable=False)
|
||||
value = Column(Text, default="")
|
||||
description = Column(String(200), default="")
|
||||
updated_at = Column(DateTime(timezone=True), server_default=func.now(), onupdate=func.now())
|
||||
Reference in New Issue
Block a user