暂停开发以下功能,将设计文档移至未完成计划文件夹: - AI 词云 (Keyword Cloud): 前端、API、数据库模型、n8n 工作流 - AI 时间轴 (AI Timeline): 前端、API、数据库模型 - 博客 (Blog): 导航链接占位 变更内容: - 删除词云和时间轴的前端页面及组件 - 删除 /api/keyword-cloud/* 和 /api/events/* API 端点 - 从 prisma/schema.prisma 移除 Keyword, Quarter, VisualStyleRule, KeywordCloudErrorLog, AIEvent 模型 - 从 validations.ts 移除相关 Zod Schema - 从国际化消息中移除 keywordCloud/timeline 命名空间 - 从导航菜单移除词云、时间轴、博客链接 - 更新 CLAUDE.md 移除词云系统文档 设计文档已移至 .omc/plans/postponed-features/ 供后续恢复开发参考
117 lines
3.2 KiB
Plaintext
117 lines
3.2 KiB
Plaintext
generator client {
|
|
provider = "prisma-client-js"
|
|
previewFeatures = ["postgresqlExtensions"]
|
|
}
|
|
|
|
datasource db {
|
|
provider = "postgresql"
|
|
url = env("DATABASE_URL")
|
|
}
|
|
|
|
model ExternalLink {
|
|
id String @id @default(cuid())
|
|
type LinkType
|
|
url String
|
|
title String?
|
|
projectId String
|
|
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
|
|
|
|
@@unique([projectId, url])
|
|
@@index([projectId], map: "idx_link_projectId")
|
|
@@index([type], map: "idx_link_type")
|
|
@@index([type, url], map: "idx_link_type_url")
|
|
@@index([url], map: "idx_link_url")
|
|
@@map("external_links")
|
|
}
|
|
|
|
model ProjectDiscoveryTask {
|
|
id String @id @default(cuid())
|
|
status TaskStatus @default(PENDING)
|
|
sourceUrl String
|
|
sourceType String @default("manual")
|
|
explorationData Json?
|
|
explorationSummary String?
|
|
errorMessage String?
|
|
retryCount Int @default(0)
|
|
lastRetryAt DateTime?
|
|
projectId String?
|
|
createdAt DateTime @default(now())
|
|
startedAt DateTime?
|
|
completedAt DateTime?
|
|
updatedAt DateTime @updatedAt
|
|
project Project? @relation(fields: [projectId], references: [id])
|
|
|
|
@@index([projectId], map: "idx_task_project_id")
|
|
@@index([sourceUrl], map: "idx_task_source_url")
|
|
@@index([status, createdAt], map: "idx_task_status_created")
|
|
@@map("project_discovery_tasks")
|
|
}
|
|
|
|
model ProjectTag {
|
|
projectId String
|
|
tagId String
|
|
project Project @relation(fields: [projectId], references: [id], onDelete: Cascade)
|
|
tag Tag @relation(fields: [tagId], references: [id], onDelete: Cascade)
|
|
|
|
@@id([projectId, tagId])
|
|
@@index([tagId])
|
|
@@map("project_tags")
|
|
}
|
|
|
|
model Project {
|
|
id String @id @default(cuid())
|
|
name String
|
|
nameEn String?
|
|
slug String @unique
|
|
description String
|
|
descriptionEn String?
|
|
content String?
|
|
contentEn String?
|
|
status ProjectStatus @default(ACTIVE)
|
|
source String?
|
|
createdAt DateTime @default(now())
|
|
updatedAt DateTime @updatedAt
|
|
embedding Unsupported("vector")?
|
|
embeddingUpdatedAt DateTime?
|
|
links ExternalLink[]
|
|
projectDiscoveryTasks ProjectDiscoveryTask[]
|
|
tags ProjectTag[]
|
|
|
|
@@index([embedding], map: "idx_project_embedding_cosine")
|
|
@@index([slug], map: "idx_project_slug")
|
|
@@index([status, createdAt], map: "idx_project_status_createdAt")
|
|
@@map("projects")
|
|
}
|
|
|
|
model Tag {
|
|
id String @id @default(cuid())
|
|
name String @unique
|
|
nameEn String?
|
|
slug String @unique
|
|
createdAt DateTime @default(now())
|
|
projects ProjectTag[]
|
|
|
|
@@index([slug], map: "idx_tag_slug")
|
|
@@map("tags")
|
|
}
|
|
|
|
enum LinkType {
|
|
WEBSITE
|
|
GITHUB
|
|
HUGGINGFACE
|
|
PAPER
|
|
}
|
|
|
|
enum ProjectStatus {
|
|
ACTIVE
|
|
ARCHIVED
|
|
}
|
|
|
|
enum TaskStatus {
|
|
PENDING
|
|
IN_PROGRESS
|
|
COMPLETED
|
|
FAILED
|
|
}
|
|
|