docs(uiux): UIUX 设计方案大改 + 5 份作业指导书对齐 + 开发任务文档

- UIUX 文档:填充 19 个缺口(多主体画像/健康度/AI+看板/增长域/洞察域/创始人端/OODA/助推/商密)
- UIUX 文档:插入 6 个新章节(十四~十九),旧章节重编号为二十~三十一,更新目录和交叉引用
- 作业指导书 x5:导航改为 6 域分组,新增 Context Bar/工作模式/Insight Rail/决策线程/多工作区等 UI 概念
- 新建 docs/2-task-uiux.md:50 个代码落地开发任务,按 P0-P6 分优先级 + 8 Sprint 规划
- 后端/前端:大量新增模型、路由、组件(来自之前 Phase 开发)
This commit is contained in:
selfrelease
2026-07-19 11:53:38 +08:00
parent 734a16a7f3
commit fad458b2a7
243 changed files with 19898 additions and 658 deletions
+59
View File
@@ -0,0 +1,59 @@
"""人才模型。
核心人才画像 + 团队成员 + 9-Box 矩阵 + 流动预测。
"""
import uuid
from datetime import datetime, timezone
from sqlalchemy import DateTime, ForeignKey, Integer, String, Text
from sqlalchemy.orm import Mapped, mapped_column
from app.core.database import Base
from app.core.types import JSONBType
class TalentProfile(Base):
"""人才画像。"""
__tablename__ = "talent_profiles"
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=lambda: str(uuid.uuid4()))
tenant_id: Mapped[str] = mapped_column(String(36), ForeignKey("tenants.id"), nullable=False, index=True)
name: Mapped[str] = mapped_column(String(100), nullable=False)
current_role: Mapped[str | None] = mapped_column(String(200), nullable=True, comment="当前职位")
current_company: Mapped[str | None] = mapped_column(String(200), nullable=True)
skills: Mapped[dict | None] = mapped_column(JSONBType, nullable=True, comment="技能标签")
experience_years: Mapped[int | None] = mapped_column(Integer, nullable=True)
performance_rating: Mapped[float | None] = mapped_column(nullable=True, comment="绩效评分(1-5")
potential_rating: Mapped[float | None] = mapped_column(nullable=True, comment="潜力评分(1-5")
nine_box: Mapped[str | None] = mapped_column(String(50), nullable=True, comment="9-Box 象限")
flow_prediction: Mapped[dict | None] = mapped_column(JSONBType, nullable=True, comment="流动预测")
status: Mapped[str] = mapped_column(String(20), nullable=False, default="active", comment="active/flowed/inactive")
created_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True), default=lambda: datetime.now(timezone.utc)
)
updated_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True),
default=lambda: datetime.now(timezone.utc),
onupdate=lambda: datetime.now(timezone.utc),
)
class TeamMember(Base):
"""团队成员。"""
__tablename__ = "team_members"
id: Mapped[str] = mapped_column(String(36), primary_key=True, default=lambda: str(uuid.uuid4()))
company_id: Mapped[str] = mapped_column(String(36), ForeignKey("companies.id"), nullable=False, index=True)
name: Mapped[str] = mapped_column(String(100), nullable=False)
role: Mapped[str | None] = mapped_column(String(200), nullable=True, comment="职位")
is_key_person: Mapped[bool] = mapped_column(default=False, comment="是否核心人员")
joined_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
left_at: Mapped[datetime | None] = mapped_column(DateTime(timezone=True), nullable=True)
stability_score: Mapped[float | None] = mapped_column(nullable=True, comment="稳定性评分(0-1")
extra_json: Mapped[dict | None] = mapped_column(JSONBType, nullable=True)
created_at: Mapped[datetime] = mapped_column(
DateTime(timezone=True), default=lambda: datetime.now(timezone.utc)
)