added tons of features

This commit is contained in:
2025-02-05 08:01:14 +02:00
parent 4ae0d8c545
commit 8138da6b1d
195 changed files with 12619 additions and 415 deletions

View File

@@ -0,0 +1,40 @@
model Category {
id Int @id @default(autoincrement())
status Boolean? @default(false)
position Int? @default(0) @db.UnsignedSmallInt
image String? @db.VarChar(384)
storeId Int @map("store_id")
locales CategoryLocale[]
createdAt DateTime @default(now()) @map("created_at")
categoriesOnPruducts CategoriesOnProducts[]
@@map("categories")
}
model CategoryLocale {
id Int @id @default(autoincrement())
category Category @relation(fields: [categoryId], references: [id])
categoryId Int @map("category_id")
lang Lang @default(uk)
title String @db.VarChar(384)
slug String? @unique @db.VarChar(384)
shortTitle String? @map("short_title")
description String? @db.Text
// content String? @db.MediumText
// extendedData Json? @map("extended_data") @db.Json
@@unique([categoryId, lang])
@@map("category_locales")
}
model CategoriesOnProducts {
store Store @relation(fields: [storeId], references: [id])
storeId Int @default(1) @map("store_id")
product Product @relation(fields: [productId], references: [id])
productId Int @map("product_id")
category Category @relation(fields: [categoryId], references: [id])
categoryId Int @map("category_id")
@@id([storeId, productId, categoryId])
@@map("categories_on_pruducts")
}