24 lines
992 B
Python
24 lines
992 B
Python
"""sys_message 站内信/消息中心表 ORM(投顾触达客户通道,发送报告时写入)。"""
|
|||
from __future__ import annotations
|
|||
|
|
|
||
|
|
from datetime import datetime
|
||
|
|
|
||
|
|
from sqlalchemy import BigInteger, DateTime, Integer, String, func
|
||
|
|
from sqlalchemy.orm import Mapped, mapped_column
|
||
|
|
|
||
|
|
from model.base import Base
|
||
|
|
|
||
|
|
|
||
|
|
class SysMessage(Base):
|
||
|
|
__tablename__ = "sys_message"
|
||
|
|
__table_args__ = {"comment": "站内信/消息中心表(投顾触达客户通道)"}
|
||
|
|
|
||
|
|
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
|
||
|
|
user_id: Mapped[int] = mapped_column(BigInteger)
|
||
|
|
msg_type: Mapped[str] = mapped_column(String(32))
|
||
|
|
title: Mapped[str] = mapped_column(String(128))
|
||
|
|
content: Mapped[str | None] = mapped_column(String(512))
|
||
|
|
biz_id: Mapped[str | None] = mapped_column(String(64))
|
||
|
|
is_read: Mapped[int] = mapped_column(Integer, server_default="0")
|
||
|
|
create_time: Mapped[datetime] = mapped_column(DateTime, server_default=func.now())
|