1ec20ee53e
保存合并前工作树中遗留的进行中改动,避免分支合并时丢失: - scheduler: 填报汇总改为定向推送给支局长/领导(而非广播@all) - router: JWT token 校验修复,bind token(UUID)不被误剥离 - 工作计划/计划列表: 搜索+筛选+分页 UI - 各列表 API 增加 search 参数支持 - docker-compose.backend.yml + backend/.dockerignore 纳入版本管理 Co-Authored-By: Claude <noreply@anthropic.com>
33 lines
761 B
Python
33 lines
761 B
Python
from pydantic import BaseModel
|
|
from typing import Optional
|
|
import uuid
|
|
from datetime import date
|
|
|
|
|
|
class WorkPlanCreate(BaseModel):
|
|
customer_id: uuid.UUID
|
|
plan_content: str = ""
|
|
plan_date: str # "YYYY-MM-DD"
|
|
status: str = "计划中"
|
|
|
|
|
|
class WorkPlanUpdate(BaseModel):
|
|
customer_id: Optional[uuid.UUID] = None
|
|
plan_content: Optional[str] = None
|
|
plan_date: Optional[str] = None
|
|
status: Optional[str] = None
|
|
manager_id: Optional[str] = None
|
|
|
|
|
|
class WorkPlanOut(BaseModel):
|
|
id: uuid.UUID
|
|
customer_id: uuid.UUID
|
|
plan_content: str
|
|
plan_date: date
|
|
manager_id: uuid.UUID
|
|
status: str
|
|
customer_name: Optional[str] = None
|
|
manager_name: Optional[str] = None
|
|
|
|
model_config = {"from_attributes": True}
|