16 lines
594 B
Python
16 lines
594 B
Python
from sqlalchemy import Integer, String, Text, func
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
from datetime import datetime
|
|
|
|
from app.database import Base
|
|
|
|
|
|
class AppSettings(Base):
|
|
__tablename__ = "app_settings"
|
|
|
|
id: Mapped[int] = mapped_column(Integer, primary_key=True)
|
|
key: Mapped[str] = mapped_column(String(100), unique=True, nullable=False)
|
|
value: Mapped[str] = mapped_column(Text, nullable=False, default="")
|
|
description: Mapped[str | None] = mapped_column(String(300))
|
|
updated_at: Mapped[datetime] = mapped_column(default=func.now(), onupdate=func.now())
|