Am I doing Prisma relations right?

I'm mostly experienced with front-end dev so I'm less confident with data modeling decisions. Attached is some additions to the model I'm building. I'm working on an app where users can write stories and the stories can have multiple chapters. Attached is an image of the Story and Chapter models as I think they need to be. Am I in the right direction or no? Is there anything you would do differently to implement such relationships?
3 Replies
Donny D
Donny DOP3y ago
Updated model. I think this makes more sense. I just need to know which story a chapter belongs to, the author of the story is implied by the story itself
Brendonovich
Brendonovich3y ago
This looks good, you can remove @unique from your ids too - that’s already implied by @id
Donny D
Donny DOP3y ago
oh nice, thanks
Want results from more Discord servers?
Add your server