27 行
566 B
Python
27 行
566 B
Python
from __future__ import annotations
|
|
from pydantic import BaseModel
|
|
|
|
|
|
class CalendarEventSchema(BaseModel):
|
|
date: str | None = None
|
|
title: str
|
|
description: str | None = None
|
|
|
|
|
|
class CalendarMonthSchema(BaseModel):
|
|
year: int
|
|
month: int
|
|
title: str | None = None
|
|
description: str | None = None
|
|
weather: str | None = None
|
|
highlights: list[str] = []
|
|
events: list[CalendarEventSchema] = []
|
|
is_available: bool = True
|
|
|
|
|
|
class CalendarMonthResponse(CalendarMonthSchema):
|
|
id: int
|
|
|
|
class Config:
|
|
from_attributes = True
|