Skip to content

Decouple database model from business logic models #5

Description

@volmedo

Currently, the Chat model used to represent a chat in the service's business logic is also used to unmarshal data records. This implies that database fields have to have the same names than the ones defined in the service model.

A possible solution would be to add struct tags to the Chat model so that the records are parsed correctly. However, that would mean adding repository-specific details to a logic model. Ideally, both should be fully decoupled, even if that implies implementing parsing routines to translate between them.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions