| 123456789101112131415 |
- from sqlalchemy import Column, Integer, String, DateTime
- from sqlalchemy.sql import func
- from app.core.database import Base
- class SystemConfig(Base):
- __tablename__ = "system_configs"
- id = Column(Integer, primary_key=True, index=True)
- key = Column(String(50), unique=True, index=True, nullable=False, comment="Configuration Key")
- value = Column(String(255), nullable=True, comment="Configuration Value")
- description = Column(String(255), nullable=True, comment="Description")
-
- created_at = Column(DateTime(timezone=True), server_default=func.now())
- updated_at = Column(DateTime(timezone=True), onupdate=func.now(), server_default=func.now())
|