2023-08-19 21:14:36 +00:00

32 lines
602 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