52 行
1.1 KiB
Python
52 行
1.1 KiB
Python
from __future__ import annotations
|
|
from pydantic import BaseModel
|
|
from typing import Any
|
|
|
|
|
|
class ProductVersionSchema(BaseModel):
|
|
version_id: str
|
|
name: str
|
|
days: int
|
|
nights: int
|
|
audience: str | None = None
|
|
description: str | None = None
|
|
highlights: list[str] = []
|
|
tag: str | None = None
|
|
|
|
|
|
class ProductVersionResponse(ProductVersionSchema):
|
|
id: int
|
|
sort_order: int = 0
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class SummerCampFaqSchema(BaseModel):
|
|
question: str
|
|
answer: str
|
|
|
|
|
|
class SummerCampSchema(BaseModel):
|
|
name: str | None = None
|
|
positioning: str | None = None
|
|
days: int | None = None
|
|
nights: int | None = None
|
|
sessions: dict | None = None
|
|
difference_from_v9: str | None = None
|
|
principles: list[str] = []
|
|
activities: list[str] = []
|
|
itinerary: list[str] = []
|
|
faq: list[SummerCampFaqSchema] = []
|
|
|
|
|
|
class SelectionGuideSchema(BaseModel):
|
|
by_vacation_length: list[Any] = []
|
|
by_child_age: list[Any] = []
|
|
by_preference: list[Any] = []
|
|
|
|
|
|
class ProductConfigSchema(BaseModel):
|
|
narrative: str | None = None
|
|
pricing_philosophy: str | None = None
|