We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be8c1c4 commit b4ac69bCopy full SHA for b4ac69b
packages/plugins/openapi/tests/openapi-restful.test.ts
@@ -35,6 +35,7 @@ model User {
35
role role @default(USER)
36
posts post_Item[]
37
profile Profile?
38
+ likes PostLike[]
39
}
40
41
model Profile {
@@ -55,12 +56,21 @@ model post_Item {
55
56
published Boolean @default(false)
57
viewCount Int @default(0)
58
notes String?
59
60
61
@@openapi.meta({
62
tagDescription: 'Post-related operations'
63
})
64
65
66
+model PostLike {
67
+ post post_Item @relation(fields: [postId], references: [id])
68
+ postId String
69
+ user User @relation(fields: [userId], references: [id])
70
+ userId String
71
+ @@id([postId, userId])
72
+}
73
+
74
model Foo {
75
id String @id
76
@@openapi.ignore
0 commit comments