"""ops_question 问卷题目表 ORM 模型。""" from __future__ import annotations from typing import Any from sqlalchemy import BigInteger, Integer, JSON, String from sqlalchemy.orm import Mapped, mapped_column from model.base import Base class OpsQuestion(Base): __tablename__ = "ops_question" __table_args__ = {"comment": "问卷题目表(题目/选项/分值可运营配置)"} id: Mapped[int] = mapped_column(BigInteger, primary_key=True, autoincrement=True) questionnaire_id: Mapped[int] = mapped_column(BigInteger) question_no: Mapped[int] = mapped_column(Integer) content: Mapped[str] = mapped_column(String(512)) option_json: Mapped[list[Any] | None] = mapped_column(JSON) score_json: Mapped[dict[str, Any] | None] = mapped_column(JSON) sort: Mapped[int] = mapped_column(Integer, server_default="0")