model Image {
id String @id @default(auto()) @map("_id") @db.ObjectId
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
publicID String @unique
width Int
height Int
url String
isPrimary Boolean @default(false)
drugItemID String? @db.ObjectId
drugItem DrugItem? @relation(fields: [drugItemID], references: [id], onDelete: Cascade)
}
model Image {
id String @id @default(auto()) @map("_id") @db.ObjectId
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
publicID String @unique
width Int
height Int
url String
isPrimary Boolean @default(false)
drugItemID String? @db.ObjectId
drugItem DrugItem? @relation(fields: [drugItemID], references: [id], onDelete: Cascade)
}