14 lines
544 B
Plaintext
14 lines
544 B
Plaintext
model ProductImage {
|
|
id String @id @default(uuid()) @db.Uuid
|
|
productId String @map("product_id") @db.Uuid
|
|
organizationId String @map("organization_id") @db.Uuid
|
|
mimeType String @map("mime_type") @db.VarChar(32)
|
|
sha256 String @db.Char(64)
|
|
size Int
|
|
content Bytes @db.ByteA
|
|
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(3)
|
|
product Product @relation(fields: [productId, organizationId], references: [id, organizationId], onDelete: Cascade)
|
|
@@index([productId, createdAt, id])
|
|
@@map("product_images")
|
|
}
|