Files
GlitchupBot/src/glitchup_bot/models/runtime_settings.py
Verum e811b259fc
Some checks failed
CI / Lint (ruff + mypy) (push) Failing after 37s
CI / Run tests (push) Has been skipped
CI / Docker build test (push) Successful in 18s
Добавление прокси + пересмена интерфейса
2026-03-31 14:24:50 +07:00

21 lines
711 B
Python

from datetime import datetime
from sqlalchemy import DateTime, Integer, String, Text, func
from sqlalchemy.orm import Mapped, mapped_column
from glitchup_bot.models.base import Base
class RuntimeSetting(Base):
__tablename__ = "runtime_settings"
id: Mapped[int] = mapped_column(Integer, primary_key=True, autoincrement=True)
key: Mapped[str] = mapped_column(String(100), unique=True, index=True)
value: Mapped[str] = mapped_column(Text)
created_at: Mapped[datetime] = mapped_column(DateTime(timezone=True), server_default=func.now())
updated_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True),
server_default=func.now(),
onupdate=func.now(),
)