Skip to content

Domain Models#168

Open
GaballaGit wants to merge 10 commits intomainfrom
feat/Domain-Models
Open

Domain Models#168
GaballaGit wants to merge 10 commits intomainfrom
feat/Domain-Models

Conversation

@GaballaGit
Copy link
Copy Markdown
Member

This PR adds Domain Models to the API.

@GaballaGit GaballaGit requested a review from sidvasu as a code owner March 1, 2026 23:34
@github-actions
Copy link
Copy Markdown

github-actions bot commented Mar 1, 2026

godoc reference preview ready ✨
Go Documentation

@GaballaGit
Copy link
Copy Markdown
Member Author

NOTE: THE MAPPER ISN'T SAFE TO MERGE YET. There are some pointer dereferences here that can cause a panic, as well as the time.Time pointers returning misleading values if the pointer is nil.

@GaballaGit GaballaGit marked this pull request as draft March 10, 2026 20:30
@GaballaGit GaballaGit marked this pull request as ready for review March 23, 2026 19:04
@GaballaGit GaballaGit requested a review from TheJolman as a code owner March 23, 2026 19:04
@GaballaGit
Copy link
Copy Markdown
Member Author

@TheJolman after 500 gajillion years I think this pr is ready for review, sorry it took me long

Copy link
Copy Markdown
Collaborator

@TheJolman TheJolman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The whole point of the domain layer is to not depend on database types in the handler layer. This means that the handler package should not be importing dbmodels and the service package should take the domain models as input.

@GaballaGit
Copy link
Copy Markdown
Member Author

The whole point of the domain layer is to not depend on database types in the handler layer. This means that the handler package should not be importing dbmodels and the service package should take the domain models as input.

Services must take a dbmodel to do db operations, there is no layer to hand over a domain as of now. Repository layer would need to be implemented so service can use domain and we can finally swap out dbmodels in handler.

@GaballaGit
Copy link
Copy Markdown
Member Author

Actually, I could probably just swap domain to db model in the service for now. Is that what you are looking for?

@TheJolman
Copy link
Copy Markdown
Collaborator

@GaballaGit yeah that's fine. And IMO implementing the repository layer isn't super important atm so don't worry about it at least until all the dtos and domain models are implemented. Ty for ur work as always 🫡

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants