ita-social-projects / Home

Home - is an all-in-one social service that will cover all aspects of your communication with your home and neighbors.
http://www.home-project-engineering.tech/api/0/apidocs/index.html
MIT License
26 stars 30 forks source link

Refactor user registration workflow #479

Closed vladyslavyarets closed 2 years ago

vladyslavyarets commented 2 years ago

Description

Every user in our application should be an owner of some apartment. Once apartment created it should already have a list of ownerships (see ticket #478). Important user information as full name should be filled by cooperation admin during apartment creation. In this way during registration process user should not change it. There 2 types of owners can be created. Person and New workflow depends with other steps:

If user is a person:

If user is a legal_state:

Tasks:

  1. Rewrite OpenApi specification due to new model. Example of required payload present below:

For person:

{
  "user_id": 4
  "registration_token": "7b3a32f0-1326-11ed-b2e2-b51ca8f90a82",
  "email": "test@gmail.com",
  "password": "Passw0rd",
  "phone_number": 380501112233
}

For legal_state user:

{
  "user_id": 4
  "registration_token": "7b3a32f0-1326-11ed-b2e2-b51ca8f90a82",
  "email": "test@gmail.com",
  "password": "Passw0rd",
  "phone_number": 380501112233
}
  1. Rewrite service layer due to new logic.

  2. Optimize user' contact information storage in the database

  3. Rewrite api tests due to new logic

vladyslavyarets commented 2 years ago

Epic was merged with task #478