Order Item
Finally, the OrderItem
model, which becomes necessary as an intermediate entity between Product
and Order
due to custom properties. As can be noticed, we use @@id
to indicate that it has a composite id
.
When saving the file, Prisma should automatically create the opposite side of the relation in Order
and Product
. Let's then just rename the field there and proceed.
Now, generate and run the migration.
Commit - Creating order item model
Last updated