Account import payload.
| 212 | model_config = ConfigDict(extra="ignore") |
| 213 | |
| 214 | ticket: str |
| 215 | randstr: str |
| 216 | ret: int | None = 0 |
| 217 | |
| 218 | |
| 219 | class PreviewPaymentRequest(BaseModel): |
| 220 | """Preview payment request payload.""" |
| 221 | |
| 222 | model_config = ConfigDict(extra="ignore") |
| 223 | |
| 224 | product_id: str |
| 225 | invitation_code: str | None = None |
| 226 | ticket: str | None = None |
| 227 | randstr: str | None = None |
| 228 | |
| 229 | |
| 230 | class PreviewSeedRequest(BaseModel): |
| 231 | """Seed a preview result into local session state for debugging.""" |
| 232 | |
| 233 | model_config = ConfigDict(extra="ignore") |
| 234 | |
| 235 | preview: dict[str, Any] |
| 236 | |
| 237 | |
| 238 | class AccountPreferencesRequest(BaseModel): |
| 239 | """Editable account/session preferences for list management UI.""" |
| 240 | |
| 241 | model_config = ConfigDict(extra="ignore") |
| 242 | |
| 243 | invitation_code: str | None = None |
| 244 | selected_product_id: str | None = None |
| 245 | schedule_enabled: bool | None = None |
| 246 | scheduled_start_time: str | None = None |
| 247 | |
| 248 | @field_validator("scheduled_start_time") |
| 249 | @classmethod |
| 250 | def validate_scheduled_start_time(cls, value: str | None) -> str | None: |
| 251 | normalized = (value or "").strip() |
| 252 | if not normalized: |
| 253 | return "" |
| 254 | parts = normalized.split(":") |
| 255 | if len(parts) not in (2, 3) or any(not part.isdigit() for part in parts): |
| 256 | raise ValueError("scheduled_start_time 必须是 HH:MM 或 HH:MM:SS") |
nothing calls this directly
no outgoing calls
no test coverage detected