Skip to content

Commit

Permalink
fix types
Browse files Browse the repository at this point in the history
  • Loading branch information
elsholz committed Dec 28, 2023
1 parent 6ae2cf1 commit 4e43708
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions api/code/metroplanner_api/type_definitions.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,28 +125,6 @@ class IndependentLabel(BaseModel):
height: NonNegativeIntOrFloat


"""
User
"""


class UpdateUser(BaseModel):
bio: LongText
display_name: ShortText
# public: bool
profile_picture: Optional[str] = None


class User(UpdateUser):
profile_views: NonNegativeInt = 0
likes_given: List[ObjectId] = []


class UserInDB(User):
_id: str # User ID from OAuth
plans_created: List["PlanPrivateView"] = []


"""
Planstate
"""
Expand Down Expand Up @@ -242,6 +220,28 @@ class PlanInDB(Plan):
deleted: Optional[datetime]


"""
User
"""


class UpdateUser(BaseModel):
bio: LongText
display_name: ShortText
# public: bool
profile_picture: Optional[str] = None


class User(UpdateUser):
profile_views: NonNegativeInt = 0
likes_given: List[ObjectId] = []
plans_created: Optional[List[PlanPrivateView]] = None


class UserInDB(User):
_id: str # User ID from OAuth


"""
Link
"""
Expand Down

0 comments on commit 4e43708

Please sign in to comment.