a4904973bf
后端 schema: WorkPlanCreate/MiniBusinessCreate/KeyVisitCreate 新增可选 manager_id 后端 API: create 端点支持 manager_id 参数(留空则默认本人) 前端: 三个页面新建弹窗新增「客户经理」下拉(仅支局长/领导可见) Co-Authored-By: Claude <noreply@anthropic.com>
38 lines
947 B
Python
38 lines
947 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
|
|
|
|
|
|
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}
|