16 lines
596 B
Python
16 lines
596 B
Python
"""系统配置模型 - 键值对存储"""
|
|
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())
|