hulai-admin-api/app/schemas/destination.py
刘涛 8c0a5f489d Initial commit: hulai admin API backend
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-22 22:01:23 +08:00

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