mirror of
https://git.meshkee.com/Meshkee/backend.git
synced 2026-08-11 22:30:59 +04:30
Add stable keys for special groups and SSL sync agent hooks.
English keys on store/website specials stay unique per business; domain-admin can trigger dashboard SSL sync. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
43e3912662
commit
f233665d13
@@ -957,6 +957,7 @@ model StoreSpecial {
|
||||
id BigInt @id @default(autoincrement())
|
||||
businessId BigInt @map("business_id")
|
||||
title String @db.VarChar(255)
|
||||
key String @db.VarChar(100)
|
||||
sortOrder Int @default(0) @map("sort_order")
|
||||
isActive Boolean @default(true) @map("is_active")
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
|
||||
@@ -964,6 +965,7 @@ model StoreSpecial {
|
||||
items StoreSpecialItem[]
|
||||
business Business @relation(fields: [businessId], references: [id], onDelete: Cascade, onUpdate: NoAction)
|
||||
|
||||
@@unique([businessId, key], map: "store_specials_business_id_key_unique")
|
||||
@@index([businessId], map: "idx_store_specials_business_id")
|
||||
@@map("store_specials")
|
||||
}
|
||||
@@ -985,6 +987,7 @@ model website_brand_groups {
|
||||
id BigInt @id @default(autoincrement())
|
||||
business_id BigInt
|
||||
title String @db.VarChar(255)
|
||||
key String @db.VarChar(100)
|
||||
sort_order Int @default(0)
|
||||
is_active Boolean @default(true)
|
||||
created_at DateTime @default(now()) @db.Timestamptz(6)
|
||||
@@ -992,6 +995,7 @@ model website_brand_groups {
|
||||
website_brand_group_items website_brand_group_items[]
|
||||
businesses Business @relation(fields: [business_id], references: [id], onDelete: Cascade, onUpdate: NoAction)
|
||||
|
||||
@@unique([business_id, key], map: "website_brand_groups_business_id_key_unique")
|
||||
@@index([business_id], map: "idx_website_brand_groups_business_id")
|
||||
}
|
||||
|
||||
@@ -1012,6 +1016,7 @@ model website_category_groups {
|
||||
id BigInt @id @default(autoincrement())
|
||||
business_id BigInt
|
||||
title String @db.VarChar(255)
|
||||
key String @db.VarChar(100)
|
||||
sort_order Int @default(0)
|
||||
is_active Boolean @default(true)
|
||||
created_at DateTime @default(now()) @db.Timestamptz(6)
|
||||
@@ -1019,6 +1024,7 @@ model website_category_groups {
|
||||
website_category_group_items website_category_group_items[]
|
||||
businesses Business @relation(fields: [business_id], references: [id], onDelete: Cascade, onUpdate: NoAction)
|
||||
|
||||
@@unique([business_id, key], map: "website_category_groups_business_id_key_unique")
|
||||
@@index([business_id], map: "idx_website_category_groups_business_id")
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user