feat: implement i18n for product and category, add 5 new locales

This commit is contained in:
Your Name committed 2026-06-13 23:58:50 -04:00
1 parent b867063efb
commit 96d874233d
17 files changed
+557 -62

No files matched your search

+19 -6
View File
@@ -18,12 +18,25 @@ model Scent {
}
model Category {
id Int @id @default(autoincrement())
name String @unique
imageUrl String?
products Product[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
id Int @id @default(autoincrement())
name String @unique
imageUrl String?
products Product[]
translations CategoryTranslation[]
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
}
model CategoryTranslation {
id Int @id @default(autoincrement())
categoryId Int
category Category @relation(fields: [categoryId], references: [id], onDelete: Cascade)
langCode String
name String
createdAt DateTime @default(now())
updatedAt DateTime @updatedAt
@@unique([categoryId, langCode])
}
model Product {