Files
Mutual_Fund/model/sensitive_word.py
T

24 lines
954 B
Python

"""sensitive_word 敏感词库表 ORM(工作台与 Agent 同源,合规拦截唯一来源)。"""
from __future__ import annotations
from datetime import datetime
from sqlalchemy import BigInteger, DateTime, String, func
from sqlalchemy.orm import Mapped, mapped_column
from model.base import Base
class SensitiveWord(Base):
__tablename__ = "sensitive_word"
__table_args__ = {"comment": "敏感词库表(工作台与Agent同源,合规拦截唯一来源)"}
id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True)
word: Mapped[str] = mapped_column(String(128), unique=True)
category: Mapped[str] = mapped_column(String(32))
level: Mapped[str] = mapped_column(String(8), server_default="高")
status: Mapped[str] = mapped_column(String(8), server_default="启用")
update_time: Mapped[datetime] = mapped_column(
DateTime, server_default=func.now(), onupdate=func.now()
)