mirror of
https://github.com/fastapi-practices/fastapi_best_architecture.git
synced 2026-03-13 09:31:31 +08:00
* Update the length style of the model columns * Fix opera log table username column length * Fix login log table username column length
18 lines
594 B
Python
18 lines
594 B
Python
import sqlalchemy as sa
|
||
|
||
from sqlalchemy.orm import Mapped, mapped_column
|
||
|
||
from backend.common.model import Base, UniversalText, id_key
|
||
|
||
|
||
class Notice(Base):
|
||
"""系统通知公告表"""
|
||
|
||
__tablename__ = 'sys_notice'
|
||
|
||
id: Mapped[id_key] = mapped_column(init=False)
|
||
title: Mapped[str] = mapped_column(sa.String(64), comment='标题')
|
||
type: Mapped[int] = mapped_column(comment='类型(0:通知、1:公告)')
|
||
status: Mapped[int] = mapped_column(comment='状态(0:隐藏、1:显示)')
|
||
content: Mapped[str] = mapped_column(UniversalText, comment='内容')
|