2023-08-20 00:06:52 +03:00

30 lines
600 B
Python

from api.models.donations import DonationFields
from api.models.socials import SocialFields
from pydantic import BaseModel
class ContactFields(BaseModel):
"""
Implements the fields for the API owner contact info.
"""
email: str
class InfoFields(BaseModel):
"""
Implements the fields for the API owner info.
"""
name: str
about: str
contact: ContactFields
socials: list[SocialFields]
donations: DonationFields
class InfoResponseModel(BaseModel):
"""
A Pydantic BaseModel that represents a dictionary of info.
"""
info: InfoFields