Add public AI prompt templates for websites.
Manage reusable templates in Super Admin, attach editable per-site prompts with Meshkee API public links that require no auth. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
4db9c7709d
commit
91a20a89d6
@@ -188,7 +188,9 @@ model Domain {
|
||||
lastDeployStatus String? @map("last_deploy_status") @db.VarChar(32)
|
||||
deploySlug String? @map("deploy_slug") @db.VarChar(64)
|
||||
gitRepoUrl String? @map("git_repo_url") @db.VarChar(512)
|
||||
aiPromptsPublicId String? @unique(map: "domains_ai_prompts_public_id_unique") @map("ai_prompts_public_id") @db.VarChar(32)
|
||||
business Business @relation(fields: [businessId], references: [id], onDelete: Cascade, onUpdate: NoAction)
|
||||
aiPrompts DomainAiPrompt[]
|
||||
|
||||
@@index([businessId], map: "idx_domains_business_id")
|
||||
@@index([host], map: "idx_domains_host")
|
||||
@@ -196,6 +198,36 @@ model Domain {
|
||||
@@map("domains")
|
||||
}
|
||||
|
||||
model AiPromptTemplate {
|
||||
id BigInt @id @default(autoincrement())
|
||||
name String @db.VarChar(255)
|
||||
body String
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
|
||||
updatedAt DateTime @default(now()) @updatedAt @map("updated_at") @db.Timestamptz(6)
|
||||
domainPrompts DomainAiPrompt[]
|
||||
|
||||
@@index([createdAt(sort: Desc)], map: "idx_ai_prompt_templates_created_at")
|
||||
@@map("ai_prompt_templates")
|
||||
}
|
||||
|
||||
model DomainAiPrompt {
|
||||
id BigInt @id @default(autoincrement())
|
||||
domainId BigInt @map("domain_id")
|
||||
sourceTemplateId BigInt? @map("source_template_id")
|
||||
name String @db.VarChar(255)
|
||||
body String
|
||||
publicId String @unique(map: "domain_ai_prompts_public_id_unique") @map("public_id") @db.VarChar(32)
|
||||
sortOrder Int @default(0) @map("sort_order")
|
||||
createdAt DateTime @default(now()) @map("created_at") @db.Timestamptz(6)
|
||||
updatedAt DateTime @default(now()) @updatedAt @map("updated_at") @db.Timestamptz(6)
|
||||
domain Domain @relation(fields: [domainId], references: [id], onDelete: Cascade, onUpdate: NoAction)
|
||||
sourceTemplate AiPromptTemplate? @relation(fields: [sourceTemplateId], references: [id], onDelete: SetNull, onUpdate: NoAction)
|
||||
|
||||
@@index([domainId, sortOrder, id], map: "idx_domain_ai_prompts_domain_id")
|
||||
@@index([sourceTemplateId], map: "idx_domain_ai_prompts_source_template_id")
|
||||
@@map("domain_ai_prompts")
|
||||
}
|
||||
|
||||
model BusinessUser {
|
||||
id BigInt @id @default(autoincrement())
|
||||
businessId BigInt @map("business_id")
|
||||
|
||||
Reference in New Issue
Block a user