Harsh Makwana
01/07/2021, 9:37 AMtype _ProductToHighlight_ @db(_name:_ "_ProductToHighlight") @relationTable {
product: Product
highlight: Highlight
highlightStatus: HighlightStatus @default(_value:_ APPROVED)
}
Richard Ward
01/07/2021, 11:06 AMHarsh Makwana
01/07/2021, 11:06 AMHarsh Makwana
01/07/2021, 11:07 AMhttps://prisma.slack.com/files/U01074J4T2T/F01JVQSHJGY/screenshot_2021-01-07_at_12.33.45_pm.png▾
Richard Ward
01/07/2021, 11:07 AM@relationTable
that looks like:
enum ProviderContactType {
REGISTER
OTHER
}
model ContactToProvider {
contact Contact @relation(fields: [contactId], references: [id])
contactId String
provider Provider @relation(fields: [providerId], references: [id])
providerId String
contactType ProviderContactType @default(OTHER)
@@id([contactId, providerId])
}
Richard Ward
01/07/2021, 11:08 AMcontacts
and providers
and has enum of contactType
Richard Ward
01/07/2021, 11:08 AM@relationTable
in your questionHarsh Makwana
01/07/2021, 11:10 AMHarsh Makwana
01/07/2021, 11:11 AMRichard Ward
01/07/2021, 11:23 AMHarsh Makwana
01/07/2021, 11:46 AM