feat: add customer travel records and browse history

This commit is contained in:
duanshuwen committed 2026-08-27 14:19:03 +08:00
1 parent 0139fe6382
commit 6d9a546918
79 files changed
+12362 -112

No files matched your search

+14
View File
@@ -10,6 +10,7 @@ LeadStatus = Literal["new", "assigned", "contacted", "planning", "won", "invalid
LeadType = Literal["general", "vehicle"]
VehicleServiceType = Literal["charter", "transfer"]
CharterDuration = Literal["halfDay", "fullDay"]
BrowseHistoryType = Literal["wanfa-route", "team-building", "wild-archive"]
class LoginIn(BaseModel):
@@ -126,6 +127,19 @@ class LeadCreateIn(BaseModel):
return self
class BrowseHistoryCreateIn(BaseModel):
itemType: BrowseHistoryType
itemId: str = Field(min_length=1, max_length=128)
@field_validator("itemId")
@classmethod
def normalize_item_id(cls, value: str) -> str:
normalized = value.strip()
if not normalized:
raise ValueError("内容 ID 不能为空")
return normalized
class LeadStatusIn(BaseModel):
status: LeadStatus