grand commit

This commit is contained in:
2025-02-07 08:34:42 +02:00
parent f594f001f6
commit c6c34f0453
53 changed files with 1283 additions and 625 deletions

View File

@@ -6,7 +6,7 @@ model Category {
storeId Int @map("store_id")
locales CategoryLocale[]
createdAt DateTime @default(now()) @map("created_at")
categoriesOnPruducts CategoriesOnProducts[]
categoriesOnProducts CategoriesOnProducts[]
@@map("categories")
}
@@ -36,5 +36,5 @@ model CategoriesOnProducts {
categoryId Int @map("category_id")
@@id([storeId, productId, categoryId])
@@map("categories_on_pruducts")
@@map("categories_on_products")
}

View File

@@ -25,7 +25,7 @@ model ProductLocale {
shortTitle String? @map("short_title")
headingTitle String? @map("heading_title")
description String? @db.MediumText
content String @db.MediumText
content String? @db.MediumText
instruction String? @db.MediumText
product Product @relation(fields: [productId], references: [id])
productId Int @map("product_id")
@@ -40,12 +40,13 @@ model ProductResource {
id Int @id @default(autoincrement())
type ResourceType
mimeType String? @map("mime_type")
isFeature Boolean? @default(false)
filesize Int? @db.UnsignedInt
width Int? @db.UnsignedSmallInt
height Int? @db.UnsignedSmallInt
quality Int? @db.UnsignedTinyInt
signature String? @db.Char(64)
uri String @db.Text
quality Float? @db.Float
signature String @db.Char(64)
uri String @db.VarChar(1024)
title String? @db.VarChar(255)
description String? @db.Text
meta Json? @db.Json
@@ -54,6 +55,7 @@ model ProductResource {
createdAt DateTime @default(now()) @map("created_at") @db.Timestamp(3)
updatedAt DateTime? @default(dbgenerated("NULL DEFAULT NULL ON UPDATE current_timestamp(3)")) @map("updated_at") @db.Timestamp(3)
@@unique([productId, signature])
@@map("product_resources")
}
@@ -85,15 +87,16 @@ model ProductAttribute {
}
model ProductToStore {
id Int @id @default(autoincrement())
position Int @default(0)
published Boolean @default(false)
available Boolean @default(false)
price Decimal @default(0) @db.Decimal(7, 2)
pricePromotional Decimal @default(0) @map("price_promotional") @db.Decimal(7, 2)
productId Int @map("product_id")
storeId Int @map("store_id")
product Product @relation(fields: [productId], references: [id])
id Int @id @default(autoincrement())
position Int @default(0)
published Boolean @default(false)
available Boolean @default(false)
price Decimal @default(0) @db.Decimal(7, 2)
pricePromotional Decimal @default(0) @map("price_promotional") @db.Decimal(7, 2)
productId Int @map("product_id")
storeId Int @map("store_id")
product Product @relation(fields: [productId], references: [id])
createdAt DateTime @default(now()) @map("created_at") @db.Timestamp(3)
@@unique([storeId, productId])
@@map("product_to_store")