Skip to content

Contact information as a separate model #184

Open
@milosmns

Description

@milosmns

Provide a brief summary of the planned work

Today, a user's contact information is stored as a flat array within the user object. It can be extracted from there and into a separate user sub-model.

Detailed overview

As a consequence of various refactoring and migrations of this codebase, a user's contact information is split into two properties (within the user model):

  • contact type (email, SMS, etc)
  • contact (value)

This means several things:

  1. Validation and tests become more complicated
  2. Only one contact method can be used (and the user might have more than one)
  3. No contact information must be presented like { contact : null, type : custom }, which is obviously less than ideal

Let's not have this legacy, and let's extract it out into a separate table.

Hint/location:

com/appifyhub/monolith/features/user/domain/model/User.kt:6

List the acceptance criteria

  • Contact info is in a table of its own
  • Contact info is only referenced by the user object
  • Users can have multiple contact infos
  • Business logic is updated to select the default communication method when sending messages to the user
  • Tests are updated to reflect these changes, and passing
  • API and documentation are updated to reflect these changes

Include any additional notes (optional)

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    FeatureNew functionality that didn't exist beforePlannedPlanned and roadmapped work

    Type

    No type

    Projects

    Status

    Ready

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions