forked from anitab-org/mentorship-backend
-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create DAO and New Endpoints for Program Mentorship Relationship #22
Open
decon-harsh
wants to merge
4
commits into
mtreacy002:ms-backend-server
Choose a base branch
from
decon-harsh:issue19
base: ms-backend-server
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
08526ce
MS Backend server for BIT development purpose
mtreacy002 8988f98
add Flask-Cors to requirements.txt
mtreacy002 d89a3dc
Create DAO and New Endpoints for Program Mentorship Relationship
decon-harsh 096cdd1
Divide One DAO function into four small different functions and some …
decon-harsh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Large diffs are not rendered by default.
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
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
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,40 @@ | ||
from flask_restx import fields, Model | ||
|
||
from app.utils.enum_utils import MentorshipRelationState | ||
from .task import create_task_request_body, list_tasks_response_body | ||
from .task_comment import task_comment_model, task_comments_model | ||
|
||
|
||
def add_models_to_namespace(api_namespace): | ||
api_namespace.models[ | ||
send_program_mentorship_request_body.name | ||
] = send_program_mentorship_request_body | ||
|
||
|
||
|
||
send_program_mentorship_request_body = Model( | ||
"Send mentorship relation request model", | ||
{ | ||
"mentor_id": fields.Integer( | ||
description="Mentorship relation mentor ID" | ||
), | ||
"mentee_id": fields.Integer( | ||
description="Mentorship relation mentee ID" | ||
), | ||
"org_rep_id": fields.Integer( | ||
required=True, description="Organization Representative's ID" | ||
), | ||
"relation_id": fields.Integer( | ||
description="Mentorship Relation ID" | ||
), | ||
"start_date": fields.Float( | ||
description="Program start date in UNIX timestamp format", | ||
), | ||
"end_date": fields.Float( | ||
description="Program end date in UNIX timestamp format", | ||
), | ||
"notes": fields.String(required=True, description="Mentorship relation notes"), | ||
}, | ||
) | ||
|
||
|
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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we place this in a separate file "bit_email_utils.py" to make it easier for contributors to locate BIT specific email logic from.