Last active
May 25, 2020 19:40
-
-
Save gabbyprecious/8ba9dd7c2844902dde60c17ba840c282 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from pydantic import BaseModel | |
class UserBase(BaseModel): | |
username: str | |
class UserCreate(UserBase): | |
first_name: str | |
last_name: str | |
email: str | |
password: str | |
class User(UserBase): | |
id: int | |
password: str | |
class Config: | |
orm_mode = True | |
#We edited from here | |
class FollowerBase(BaseModel): | |
userId: int | |
FollowerId: int | |
class FollowerCreate(FollowerBase): | |
pass | |
class Follower(FollowerBase): | |
id: int | |
class Config: | |
orm_mode = True | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment