iPrody / iPrody-Devs-Gr0000000008-customer-service

0 stars 2 forks source link

Customer Service: Customer Domain #11

Closed usharik closed 3 months ago

usharik commented 3 months ago

Prerequisites Customer Service stores data representing a customer that inquired a product at least once. This data specifies details about a customer, mostly for establishing a communication with. This data is not static, however changes quite rarely. This data can't be changed by customer rather requesting any change to a manager. Usually this data is needed while a manager does operations (changing status, making any decision, arranging purchase, etc.) with an inquiry.

What will happen if a customer bought any product? It should be propagated to a system called User Profile. That system is abstract storage for all user even created in a system (e.g. customer that bought a product, manager that works with the system, system administrator, etc)

Structures:

Telegram ID must match Telegram format.

Once persistent layer implemented, a service layer for introducing required business operations must be implemented. Operations:

In order to implement service layer tests we have to have a storage to prove that data fetch, add, update, etc. For this we will integration tests approach in combination Spring Boot Test + Testcontainer. Testcontainer will help us to establish a storage and populate data in it.

NOTE: Do not need to cover Spring Repositories with tests

So that,

DoR

A-Sakhmina commented 3 months ago

Steps:

  1. application.properties 1.2. add database connection 1.3. liquibase connection
  2. add mvn dependency in pom.xml
  3. create classes with Entity
  4. Liquibase 4.1. changelog file master.xml(or yml) 4.2. add changelog files for create

Links

  1. Use Liquibase to Safely Evolve Your Database Schema
  2. Liquibase + Spring Boot ➡ Настройка и написание миграций