guideCity/backend/app/schemas/place.py

33 lines
696 B
Python
Raw Normal View History

from pydantic import BaseModel
from app.models.enums import ContentLanguage, ContentLength, PlaceCategory
from app.schemas.common import LatLon
class ContentOut(BaseModel):
language: ContentLanguage
length: ContentLength
title: str
body: str
class PlaceListItem(BaseModel):
id: int
slug: str
category: PlaceCategory
name: str
location: LatLon
class PlaceDetail(BaseModel):
id: int
slug: str
category: PlaceCategory
location: LatLon
address: str | None = None
district: str | None = None
built_year: str | None = None
architect_builder: str | None = None
architectural_style: str | None = None
content: ContentOut