From bd3664c6315dca15d15bdf4d4a6342b2131e041c Mon Sep 17 00:00:00 2001 From: anand Date: Sat, 13 Dec 2025 17:06:22 +0530 Subject: moving --- .../plannerapp/base/team_base.py | 133 +++++++++++++++++++++ 1 file changed, 133 insertions(+) create mode 100644 django/factwise-python/factwise_submission/plannerapp/base/team_base.py (limited to 'django/factwise-python/factwise_submission/plannerapp/base/team_base.py') diff --git a/django/factwise-python/factwise_submission/plannerapp/base/team_base.py b/django/factwise-python/factwise_submission/plannerapp/base/team_base.py new file mode 100644 index 0000000..29b1a5d --- /dev/null +++ b/django/factwise-python/factwise_submission/plannerapp/base/team_base.py @@ -0,0 +1,133 @@ +class TeamBase: + """ + Base interface implementation for API's to manage teams. + For simplicity a single team manages a single project. And there is a separate team per project. + Users can be + """ + + # create a team + def create_team(self, request: str) -> str: + """ + :param request: A json string with the team details + { + "name" : "", + "description" : "", + "admin": "" + } + :return: A json string with the response {"id" : ""} + + Constraint: + * Team name must be unique + * Name can be max 64 characters + * Description can be max 128 characters + """ + pass + + # list all teams + def list_teams(self) -> str: + """ + :return: A json list with the response. + [ + { + "name" : "", + "description" : "", + "creation_time" : "", + "admin": "" + } + ] + """ + pass + + # describe team + def describe_team(self, request: str) -> str: + """ + :param request: A json string with the team details + { + "id" : "" + } + + :return: A json string with the response + + { + "name" : "", + "description" : "", + "creation_time" : "", + "admin": "" + } + + """ + pass + + # update team + def update_team(self, request: str) -> str: + """ + :param request: A json string with the team details + { + "id" : "", + "team" : { + "name" : "", + "description" : "", + "admin": "" + } + } + + :return: + + Constraint: + * Team name must be unique + * Name can be max 64 characters + * Description can be max 128 characters + """ + pass + + # add users to team + def add_users_to_team(self, request: str): + """ + :param request: A json string with the team details + { + "id" : "", + "users" : ["user_id 1", "user_id2"] + } + + :return: + + Constraint: + * Cap the max users that can be added to 50 + """ + pass + + # add users to team + def remove_users_from_team(self, request: str): + """ + :param request: A json string with the team details + { + "id" : "", + "users" : ["user_id 1", "user_id2"] + } + + :return: + + Constraint: + * Cap the max users that can be added to 50 + """ + pass + + # list users of a team + def list_team_users(self, request: str): + """ + :param request: A json string with the team identifier + { + "id" : "" + } + + :return: + [ + { + "id" : "", + "name" : "", + "display_name" : "" + } + ] + """ + pass + -- cgit v1.2.3