merge: integrate ZSY customer service and profile capabilities
This commit is contained in:
@@ -1,30 +1,11 @@
|
||||
"""Additive projection model for opening-risk questionnaire profiles."""
|
||||
"""Compatibility exports for opening-risk questionnaire profiles.
|
||||
|
||||
from datetime import datetime
|
||||
from typing import Any
|
||||
The canonical ``profile_snapshots`` mapping lives in ``app.model.profile``. Keeping
|
||||
two declarative classes for the same table makes SQLAlchemy reject model imports,
|
||||
so this module re-exports the canonical class for existing callers.
|
||||
"""
|
||||
|
||||
from sqlalchemy import JSON, BigInteger, DateTime, String
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from app.model.base import Base
|
||||
from app.model.fund import FundRiskAssessment as RiskAssessment
|
||||
|
||||
|
||||
class ProfileSnapshot(Base):
|
||||
__tablename__ = "profile_snapshots"
|
||||
|
||||
id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
profile_uuid: Mapped[str | None] = mapped_column(String(36), unique=True)
|
||||
customer_id: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
version: Mapped[int] = mapped_column(BigInteger, nullable=False)
|
||||
snapshot: Mapped[dict[str, Any]] = mapped_column(JSON, nullable=False)
|
||||
generation_basis: Mapped[dict[str, Any] | None] = mapped_column(JSON)
|
||||
snapshot_hash: Mapped[str | None] = mapped_column(String(64))
|
||||
is_current: Mapped[bool] = mapped_column(nullable=False, default=False)
|
||||
current_customer_id: Mapped[int | None] = mapped_column(BigInteger)
|
||||
generated_at: Mapped[datetime | None] = mapped_column(DateTime)
|
||||
created_at: Mapped[datetime] = mapped_column(DateTime, nullable=False)
|
||||
updated_at: Mapped[datetime] = mapped_column(DateTime, nullable=False)
|
||||
|
||||
from app.model.profile import ProfileSnapshot
|
||||
|
||||
__all__ = ["ProfileSnapshot", "RiskAssessment"]
|
||||
|
||||
Reference in New Issue
Block a user