55 行
1.1 KiB
Python
55 行
1.1 KiB
Python
from __future__ import annotations
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class DestinationConfigSchema(BaseModel):
|
|
title: str | None = None
|
|
subtitle: str | None = None
|
|
intro: str | None = None
|
|
closing_title: str | None = None
|
|
closing_text: str | None = None
|
|
data_sources: str | None = None
|
|
honest_title: str | None = None
|
|
honest_subtitle: str | None = None
|
|
|
|
|
|
class DestinationItemSchema(BaseModel):
|
|
dest_id: str
|
|
name: str
|
|
tag: str | None = None
|
|
highlight: bool = False
|
|
|
|
|
|
class DestinationItemResponse(DestinationItemSchema):
|
|
id: int
|
|
sort_order: int = 0
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class DestinationDimensionSchema(BaseModel):
|
|
label: str
|
|
icon: str | None = None
|
|
values: list[str] = []
|
|
|
|
|
|
class DestinationDimensionResponse(DestinationDimensionSchema):
|
|
id: int
|
|
sort_order: int = 0
|
|
|
|
class Config:
|
|
from_attributes = True
|
|
|
|
|
|
class DestinationHonestItemSchema(BaseModel):
|
|
text: str
|
|
|
|
|
|
class DestinationHonestItemResponse(DestinationHonestItemSchema):
|
|
id: int
|
|
sort_order: int = 0
|
|
|
|
class Config:
|
|
from_attributes = True
|