-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Open
Labels
kind/featureA request for a new feature.A request for a new feature.topic: polymorphic relationshiptopic: schema
Description
I have the following schema:
model Post {
id String @default(cuid()) @id
}
model Comment {
id String @default(cuid()) @id
}
model Vote {
id String @default(cuid()) @id
item Post | Comment
}
I'd like to associate the Vote model so that a vote an be created for a Post or a Comment.
As it stands now I have multiple models, PostVote and CommentVote which seems less than ideal.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
kind/featureA request for a new feature.A request for a new feature.topic: polymorphic relationshiptopic: schema