Skip to content

Commit 65f3288

Browse files
committed
reflect changes
1 parent d208da1 commit 65f3288

File tree

2 files changed

+2
-10
lines changed

2 files changed

+2
-10
lines changed

ch05/planner/models/users.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,16 @@
1-
from typing import Optional, List
21
from pydantic import BaseModel, EmailStr
32

4-
from models.events import Event
53

64

75
class User(BaseModel):
86
email: EmailStr
97
password: str
10-
events: Optional[List[Event]]
118

129
class Config:
1310
schema_extra = {
1411
"example": {
1512
"email": "fastapi@packt.com",
1613
"password": "strong!!!",
17-
"events": [],
1814
}
1915
}
2016

@@ -28,4 +24,4 @@ class UserSignIn(BaseModel):
2824
"email": "fastapi@packt.com",
2925
"password": "strong!!!"
3026
}
31-
}
27+
}

ch06/planner/models/users.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
1-
from typing import Optional, List
2-
from beanie import Document, Link
1+
from beanie import Document
32

43
from pydantic import BaseModel, EmailStr
54

6-
from models.events import Event
75

86

97
class User(Document):
108
email: EmailStr
119
password: str
12-
events: Optional[List[Link[Event]]]
1310

1411
class Collection:
1512
name = "users"
@@ -19,7 +16,6 @@ class Config:
1916
"example": {
2017
"email": "fastapi@packt.com",
2118
"password": "strong!!!",
22-
"events": [],
2319
}
2420
}
2521

0 commit comments

Comments
 (0)