mirror of
https://github.com/TronoSfera/Law.git
synced 2026-05-18 10:03:45 +03:00
11 lines
568 B
Python
11 lines
568 B
Python
from sqlalchemy import String, Boolean, Integer
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
|
from app.db.session import Base
|
|
from app.models.common import UUIDMixin, TimestampMixin
|
|
|
|
class Topic(Base, UUIDMixin, TimestampMixin):
|
|
__tablename__ = "topics"
|
|
code: Mapped[str] = mapped_column(String(50), unique=True, nullable=False)
|
|
name: Mapped[str] = mapped_column(String(200), nullable=False)
|
|
enabled: Mapped[bool] = mapped_column(Boolean, default=True, nullable=False)
|
|
sort_order: Mapped[int] = mapped_column(Integer, default=0, nullable=False)
|