From bd3664c6315dca15d15bdf4d4a6342b2131e041c Mon Sep 17 00:00:00 2001 From: anand Date: Sat, 13 Dec 2025 17:06:22 +0530 Subject: moving --- .../plannerapp/base/user_base.py | 94 ++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 django/factwise-python/factwise_submission/plannerapp/base/user_base.py (limited to 'django/factwise-python/factwise_submission/plannerapp/base/user_base.py') diff --git a/django/factwise-python/factwise_submission/plannerapp/base/user_base.py b/django/factwise-python/factwise_submission/plannerapp/base/user_base.py new file mode 100644 index 0000000..ec4dbc7 --- /dev/null +++ b/django/factwise-python/factwise_submission/plannerapp/base/user_base.py @@ -0,0 +1,94 @@ +class UserBase: + """ + Base interface implementation for API's to manage users. + """ + + # create a user + def create_user(self, request: str) -> str: + """ + :param request: A json string with the user details + { + "name" : "", + "display_name" : "" + } + :return: A json string with the response {"id" : ""} + + Constraint: + * user name must be unique + * name can be max 64 characters + * display name can be max 64 characters + """ + pass + + # list all users + def list_users(self) -> str: + """ + :return: A json list with the response + [ + { + "name" : "", + "display_name" : "", + "creation_time" : "" + } + ] + """ + pass + + # describe user + def describe_user(self, request: str) -> str: + """ + :param request: A json string with the user details + { + "id" : "" + } + + :return: A json string with the response + + { + "name" : "", + "description" : "", + "creation_time" : "" + } + + """ + pass + + # update user + def update_user(self, request: str) -> str: + """ + :param request: A json string with the user details + { + "id" : "", + "user" : { + "name" : "", + "display_name" : "" + } + } + + :return: + + Constraint: + * user name cannot be updated + * name can be max 64 characters + * display name can be max 128 characters + """ + pass + + def get_user_teams(self, request: str) -> str: + """ + :param request: + { + "id" : "" + } + + :return: A json list with the response. + [ + { + "name" : "", + "description" : "", + "creation_time" : "" + } + ] + """ + pass + -- cgit v1.2.3