Merge branch 'develop' of http://47.106.207.27:3000/AI260626/Mutual_Fund into develop_feat_apizyc
# Conflicts: # api/router.py # logs/error.log # logs/info.log # model/fin_customer_profile.py # requirements.txt
This commit is contained in:
@@ -3,8 +3,9 @@ from __future__ import annotations
|
||||
|
||||
from datetime import datetime
|
||||
from decimal import Decimal
|
||||
from typing import Any
|
||||
|
||||
from sqlalchemy import JSON, BigInteger, DateTime, Integer, Numeric, String, func
|
||||
from sqlalchemy import BigInteger, DateTime, Integer, JSON, Numeric, String, func
|
||||
from sqlalchemy.orm import Mapped, mapped_column
|
||||
|
||||
from model.base import Base
|
||||
@@ -14,20 +15,17 @@ class FinCustomerProfile(Base):
|
||||
__tablename__ = "fin_customer_profile"
|
||||
__table_args__ = {"comment": "客户画像主表(RAG/GraphRAG 个性化推荐核心上下文)"}
|
||||
|
||||
customer_id: Mapped[int] = mapped_column(
|
||||
BigInteger, primary_key=True, autoincrement=False
|
||||
)
|
||||
# 主键为 customer_id(一对一关联 sys_user.id),非自增 id
|
||||
customer_id: Mapped[int] = mapped_column(BigInteger, primary_key=True)
|
||||
risk_level: Mapped[str | None] = mapped_column(String(16))
|
||||
risk_score: Mapped[int | None] = mapped_column(Integer)
|
||||
investment_experience: Mapped[str | None] = mapped_column(String(16))
|
||||
annual_income_range: Mapped[str | None] = mapped_column(String(32))
|
||||
total_assets: Mapped[Decimal | None] = mapped_column(Numeric(18, 2))
|
||||
asset_allocation: Mapped[dict | None] = mapped_column(JSON)
|
||||
product_preference: Mapped[dict | None] = mapped_column(JSON)
|
||||
asset_allocation: Mapped[dict[str, Any] | None] = mapped_column(JSON)
|
||||
product_preference: Mapped[dict[str, Any] | None] = mapped_column(JSON)
|
||||
customer_level: Mapped[str | None] = mapped_column(String(16))
|
||||
confidence_score: Mapped[Decimal] = mapped_column(
|
||||
Numeric(5, 2), server_default="0.50"
|
||||
)
|
||||
confidence_score: Mapped[Decimal] = mapped_column(Numeric(5, 2), server_default="0.50")
|
||||
profile_version: Mapped[int] = mapped_column(Integer, server_default="1")
|
||||
update_time: Mapped[datetime] = mapped_column(
|
||||
DateTime, server_default=func.now(), onupdate=func.now()
|
||||
|
||||
Reference in New Issue
Block a user