Conversation
|
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. |
|
@TheJolman after 500 gajillion years I think this pr is ready for review, sorry it took me long |
TheJolman
left a comment
There was a problem hiding this comment.
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. |
|
Actually, I could probably just swap domain to db model in the service for now. Is that what you are looking for? |
|
@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 🫡 |
This PR adds Domain Models to the API.