feat: add unit mapping functionality and confirmation dialog for unit changes in import process
Test Suite / test (24.15.0) (push) Has been cancelled
Test Suite / test (24.15.0) (push) Has been cancelled
This commit is contained in:
@@ -242,3 +242,18 @@ model Nutrition {
|
||||
fiber Float?
|
||||
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
||||
}
|
||||
|
||||
model UnitMapping {
|
||||
id Int @id @default(autoincrement())
|
||||
productId Int
|
||||
originalUnit String
|
||||
preferredUnit String
|
||||
userId Int
|
||||
|
||||
product Product @relation(fields: [productId], references: [id], onDelete: Cascade)
|
||||
user User @relation(fields: [userId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@unique([productId, originalUnit, userId])
|
||||
@@index([productId])
|
||||
@@index([userId])
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user