switched docstring format to one-line-sphinx

This commit is contained in:
Lucas Jensen
2024-05-05 13:32:31 -07:00
parent ab0fae44f7
commit e1a29b398e
12 changed files with 300 additions and 243 deletions

View File

@@ -6,10 +6,18 @@ from pydantic import BaseModel, HttpUrl
class Poster(BaseModel):
"""
Represents a poster image file for an EventSeries object.
"""
file: UploadFile
class NewEvent(BaseModel):
"""
Represents a new event object as received from the client.
"""
location: str
time: datetime
map_url: Optional[HttpUrl] = None
@@ -17,16 +25,28 @@ class NewEvent(BaseModel):
class Event(NewEvent):
"""
Represents an existing event object to be returned to the client.
"""
event_id: int
class NewEventSeries(BaseModel):
"""
Represents a new event series object as received from the client.
"""
name: str
description: str
events: list[NewEvent]
class EventSeries(NewEventSeries):
"""
Represents an existing event series object to be returned to the client.
"""
series_id: int
events: list[Event]
poster_id: Optional[str] = None