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 am creating this project in Typescript.
I saw there are multiple models for the same entity (Product). For example:
-ProductComplete
-ProductDetail
...
Should these models be strictly separate entities (like classes or whatever) or is this
just how the JSON response should look like?
For example, in Sequelize I have a Product model, but that's Sequelize's model. Does it have to do anything with these models?
My question is basically, are these given models just data structures I should follow in terms of JSON response or they should be a separate entity?
I sent the image of my Product model as an example of how my model looks like.
Do I need separate ProductComplete and ProductDetails models?
Now I know this might be a stupid question, obviously, it depends on the design but what's recommended?
I hope you guys understand my question.
Thanks
The text was updated successfully, but these errors were encountered:
I am creating this project in Typescript.
I saw there are multiple models for the same entity (Product). For example:
-ProductComplete
-ProductDetail
...
Should these models be strictly separate entities (like classes or whatever) or is this
just how the JSON response should look like?
For example, in Sequelize I have a Product model, but that's Sequelize's model. Does it have to do anything with these models?
My question is basically, are these given models just data structures I should follow in terms of JSON response or they should be a separate entity?
I sent the image of my Product model as an example of how my model looks like.
Do I need separate ProductComplete and ProductDetails models?
Now I know this might be a stupid question, obviously, it depends on the design but what's recommended?
I hope you guys understand my question.
Thanks
The text was updated successfully, but these errors were encountered: