For correct process of cooperation workflow there required for all apartments in the cooperation should be filled. Every apartment should have all ownerships filled. So, for correct apartment registration required following payload:
New field ownerships(array) required. There 2 types of ownership can exist. person - is a physical user or non-legal-entity user, human. legal_entity - in this case owner can be a not physical person but legal entity. Due to this there different required fields in every case:
for person:
first_name - string
last_name - string
middle_name - string
for legal_entity:
name - string (official legal entity name)
edrpou - integer (unique identifier of this entity according to registration documents)
Required field for every ownership:
type - string (type of ownership person or legal_entity)
ownership_part - string (numeric coefficient of part of property owning). Constraint: Sum of all ownership parts for one apartment should be exactly 1.
Tasks:
Change OpenApi specification due to requirements described above.
Change Service workflow. Now users should be created in the Database during apartment creation by information contains in ownership part. This new user should be created as disabled and contains following information: first name, middle, name, last name if this is person registered or name and edrpou if this owner is legal_entity.
Rewrite api tests due to new logic
User
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:
Cooperation admin crates apartment where filled users information. User's information with data saves into Database
After this by owner request cooperation admin can create invitation for user by concrete email. During this process registration token generates and sends to user with email
If user is a person:
user set the following fields: registration token, email, password and phone number.
If user is a legal_state:
user set all fields for a person and his full name.
After user confirm registration and there is no exception situations user record into Database updates and user becomes active
Tasks:
Rewrite OpenApi specification due to new model. Example of required payload present below:
Apartment
Description:
For correct process of cooperation workflow there required for all apartments in the cooperation should be filled. Every apartment should have all ownerships filled. So, for correct apartment registration required following payload:
New field
ownerships
(array) required. There 2 types of ownership can exist.person
- is a physical user or non-legal-entity user, human.legal_entity
- in this case owner can be a not physical person but legal entity. Due to this there different required fields in every case:person
:first_name
- stringlast_name
- stringmiddle_name
- stringlegal_entity
:name
- string (official legal entity name)edrpou
- integer (unique identifier of this entity according to registration documents)Required field for every ownership:
type
- string (type of ownershipperson
orlegal_entity
)ownership_part
- string (numeric coefficient of part of property owning). Constraint: Sum of all ownership parts for one apartment should be exactly 1.Tasks:
Change OpenApi specification due to requirements described above.
Change Service workflow. Now users should be created in the Database during apartment creation by information contains in ownership part. This new user should be created as disabled and contains following information: first name, middle, name, last name if this is
person
registered or name and edrpou if this owner islegal_entity
.Rewrite api tests due to new logic
User
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
:user set all fields for a person and his full name.
After user confirm registration and there is no exception situations user record into Database updates and user becomes active
Tasks:
For
person
:For
legal_state
user:Rewrite service layer due to new logic.
Optimize user' contact information storage in the database
Rewrite api tests due to new logic
Versioning workflow
Create
feature/Issue#478...
fromdev
Create
feature/Issue#482...
from branch #4783.1. Create
feature/Issue#480...
from branch #482 and implement task. Merge into #482 branch3.2. Create
feature/Issue#481...
from branch #482 and implement task. Merge into #482 branch5.1. Create new branch from #478 for implementing new service logic for user and apartment registration and merge it back
5.2. Create new branch from #478 and cover all new logic with api tests and change tests already created and merge it back
dev