You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think product link uri generation should be on usecase. It needs several logic not related on how we store product, like web, mobile, applink generation.
In general I would say non crud operation should not be here, we should have it on usecase or repository level (I prefer on usecase level tho).
The text was updated successfully, but these errors were encountered:
wejick
changed the title
Product uri generation should be on usecase?
Non CRUD method on model level (was Product uri generation should be on usecase? )
Apr 7, 2019
For me, simple getter method for a model is fine because eventhough it would be placed in the usecase, it'll be behaving the same anyway, plus, putting the getter & setter method in the model itself would make no code duplication.
Or if we don't want to have it in the model, we 'll need to populate it on the repository level (but of course it'll consume more memory for the struct)
clean-arch/sample-app/pkg/model/product/method.go
Line 16 in c92f4ea
I think product link uri generation should be on usecase. It needs several logic not related on how we store product, like web, mobile, applink generation.
In general I would say non crud operation should not be here, we should have it on usecase or repository level (I prefer on usecase level tho).
The text was updated successfully, but these errors were encountered: