config: add model relation
This commit is contained in:
parent
d65a0067ed
commit
946ad0db71
|
|
@ -100,6 +100,7 @@ model Product {
|
||||||
model Review {
|
model Review {
|
||||||
id Int @id @default(autoincrement())
|
id Int @id @default(autoincrement())
|
||||||
productId Int
|
productId Int
|
||||||
|
modelId Int
|
||||||
content String
|
content String
|
||||||
keywords String[]
|
keywords String[]
|
||||||
sentiment Sentiment
|
sentiment Sentiment
|
||||||
|
|
@ -108,6 +109,7 @@ model Review {
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
|
|
||||||
product Product @relation(fields: [productId], references: [id])
|
product Product @relation(fields: [productId], references: [id])
|
||||||
|
model Model @relation(fields: [modelId], references: [id])
|
||||||
analysis Analysis[]
|
analysis Analysis[]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -123,4 +125,5 @@ model Model {
|
||||||
updatedAt DateTime @updatedAt
|
updatedAt DateTime @updatedAt
|
||||||
|
|
||||||
analysis Analysis[]
|
analysis Analysis[]
|
||||||
|
review Review[]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue