-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
adding email functionality. Users can send emails to other users
- Loading branch information
1 parent
a927074
commit b674809
Showing
10 changed files
with
520 additions
and
273 deletions.
There are no files selected for viewing
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
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
import datetime | ||
|
||
from src.domain.users_messages import Messages | ||
|
||
message_reg = [ | ||
Messages( | ||
user_id='user_id_1', | ||
full_name_sender='user_id_1', | ||
email_sender='[email protected]', | ||
message='user_id_1', | ||
datum_vnosa=datetime.datetime.now(), | ||
).dict(by_alias=True), | ||
Messages( | ||
user_id='user_id_2', | ||
full_name_sender='user_id_2', | ||
email_sender='[email protected]', | ||
message='user_id_2', | ||
datum_vnosa=datetime.datetime.now(), | ||
).dict(by_alias=True), | ||
] |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
import datetime | ||
from typing import Optional | ||
|
||
from bson import ObjectId | ||
from pydantic import BaseModel, Field | ||
|
||
|
||
class Messages(BaseModel): | ||
id: Optional[str] = Field(alias='_id', default_factory=lambda: str(ObjectId())) | ||
user_id: str | ||
full_name_sender: str | ||
email_sender: str | ||
message: str | ||
datum_vnosa: datetime.datetime = Field(default_factory=datetime.datetime.now) |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.