4453ee2ca0
后端: - 5个模块的 Create/Update schema 新增可选 manager_id 字段 - POST 端点: director/leader 可指定 manager_id,manager 角色自动用自身 - PUT 端点: director/leader 可修改 manager_id,manager 角色禁止修改 前端(移动端+桌面端共10个页面): - 支局长/领导可见「客户经理」下拉选择框 - 创建和编辑时均可指定记录归属的客户经理 - 涵盖今日拜访、今日纪要、工作计划、商机跟单、要客拜访五个模块 Co-Authored-By: Claude <noreply@anthropic.com>
39 lines
990 B
Python
39 lines
990 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
import uuid
|
|
|
|
|
|
class MiniBusinessCreate(BaseModel):
|
|
customer_id: uuid.UUID
|
|
product_type: str = ""
|
|
amount: str = ""
|
|
follow_up_detail: str = ""
|
|
status: str = "跟进中"
|
|
expected_revenue_date: str = ""
|
|
manager_id: Optional[uuid.UUID] = None
|
|
|
|
|
|
class MiniBusinessUpdate(BaseModel):
|
|
customer_id: Optional[uuid.UUID] = None
|
|
product_type: Optional[str] = None
|
|
amount: Optional[str] = None
|
|
follow_up_detail: Optional[str] = None
|
|
status: Optional[str] = None
|
|
expected_revenue_date: Optional[str] = None
|
|
manager_id: Optional[uuid.UUID] = None
|
|
|
|
|
|
class MiniBusinessOut(BaseModel):
|
|
id: uuid.UUID
|
|
customer_id: uuid.UUID
|
|
product_type: str
|
|
amount: str
|
|
follow_up_detail: str
|
|
status: str
|
|
manager_id: uuid.UUID
|
|
expected_revenue_date: str
|
|
customer_name: Optional[str] = None
|
|
manager_name: Optional[str] = None
|
|
|
|
model_config = {"from_attributes": True}
|