e99d0aec8a
This reverts commit a4904973bf.
37 lines
904 B
Python
37 lines
904 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 = ""
|
|
|
|
|
|
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}
|