update:增加文档模式
This commit is contained in:
@@ -0,0 +1,4 @@
|
||||
-- SQLite stores Prisma enums as TEXT, so AccessMode.none does not require a
|
||||
-- physical enum migration here. The only schema change needed is the display
|
||||
-- version override column on tools.
|
||||
ALTER TABLE "tools" ADD COLUMN "version_override" TEXT;
|
||||
BIN
server/prisma/prisma.zip
Normal file
BIN
server/prisma/prisma.zip
Normal file
Binary file not shown.
@@ -10,6 +10,7 @@ datasource db {
|
||||
enum AccessMode {
|
||||
web
|
||||
download
|
||||
none
|
||||
}
|
||||
|
||||
enum ToolStatus {
|
||||
@@ -45,6 +46,7 @@ model Tool {
|
||||
openCount Int @default(0) @map("open_count")
|
||||
accessMode AccessMode @default(download) @map("access_mode")
|
||||
openUrl String? @map("open_url")
|
||||
versionOverride String? @map("version_override")
|
||||
openInNewTab Boolean @default(true) @map("open_in_new_tab")
|
||||
latestArtifactId String? @map("latest_artifact_id")
|
||||
status ToolStatus @default(draft)
|
||||
|
||||
@@ -38,6 +38,7 @@ type ToolSeed = {
|
||||
openCount: number;
|
||||
accessMode: AccessMode;
|
||||
openUrl?: string;
|
||||
versionOverride?: string;
|
||||
openInNewTab?: boolean;
|
||||
status: ToolStatus;
|
||||
createdAt: Date;
|
||||
@@ -132,6 +133,7 @@ async function createToolWithRelations(tool: ToolSeed) {
|
||||
openCount: tool.openCount,
|
||||
accessMode: tool.accessMode,
|
||||
openUrl: tool.openUrl,
|
||||
versionOverride: tool.versionOverride,
|
||||
openInNewTab: tool.openInNewTab ?? true,
|
||||
status: tool.status,
|
||||
createdAt: tool.createdAt,
|
||||
@@ -251,6 +253,7 @@ async function main() {
|
||||
openCount: 642,
|
||||
accessMode: AccessMode.web,
|
||||
openUrl: 'https://platform.openai.com/playground',
|
||||
versionOverride: '2026.04',
|
||||
openInNewTab: true,
|
||||
status: ToolStatus.published,
|
||||
createdAt: daysAgo(45, 10, 0),
|
||||
@@ -282,6 +285,7 @@ async function main() {
|
||||
openCount: 438,
|
||||
accessMode: AccessMode.web,
|
||||
openUrl: 'https://claude.ai',
|
||||
versionOverride: '2026.03',
|
||||
openInNewTab: true,
|
||||
status: ToolStatus.published,
|
||||
createdAt: daysAgo(31, 11, 0),
|
||||
@@ -344,6 +348,7 @@ async function main() {
|
||||
openCount: 196,
|
||||
accessMode: AccessMode.web,
|
||||
openUrl: 'https://atlas.example.internal/runbooks',
|
||||
versionOverride: 'atlas-3.2',
|
||||
openInNewTab: false,
|
||||
status: ToolStatus.published,
|
||||
createdAt: daysAgo(19, 9, 0),
|
||||
@@ -379,6 +384,7 @@ async function main() {
|
||||
openCount: 153,
|
||||
accessMode: AccessMode.web,
|
||||
openUrl: 'https://www.notion.so',
|
||||
versionOverride: 'workflow-1.8',
|
||||
openInNewTab: true,
|
||||
status: ToolStatus.published,
|
||||
createdAt: daysAgo(12, 13, 30),
|
||||
@@ -413,6 +419,7 @@ async function main() {
|
||||
downloadCount: 182,
|
||||
openCount: 0,
|
||||
accessMode: AccessMode.download,
|
||||
versionOverride: 'stable-1.1',
|
||||
status: ToolStatus.published,
|
||||
createdAt: daysAgo(40, 10, 15),
|
||||
updatedAt: dateOnly(daysAgo(0)),
|
||||
@@ -515,6 +522,7 @@ async function main() {
|
||||
downloadCount: 89,
|
||||
openCount: 0,
|
||||
accessMode: AccessMode.download,
|
||||
versionOverride: 'stable-2.1',
|
||||
status: ToolStatus.published,
|
||||
createdAt: daysAgo(26, 9, 40),
|
||||
updatedAt: dateOnly(daysAgo(4)),
|
||||
@@ -569,6 +577,40 @@ async function main() {
|
||||
],
|
||||
latestArtifactId: 'art_202',
|
||||
},
|
||||
{
|
||||
id: 'tool_none_001',
|
||||
name: 'Prompt Catalog Preview',
|
||||
slug: 'prompt-catalog-preview',
|
||||
categoryId: 'cat_ai',
|
||||
description:
|
||||
'Preview-only catalog for upcoming internal prompt packs, curation notes, and launch plans.',
|
||||
rating: 4.1,
|
||||
downloadCount: 0,
|
||||
openCount: 0,
|
||||
accessMode: AccessMode.none,
|
||||
versionOverride: 'preview-2026.04',
|
||||
status: ToolStatus.published,
|
||||
createdAt: daysAgo(7, 15, 20),
|
||||
updatedAt: dateOnly(daysAgo(0)),
|
||||
features: [
|
||||
{
|
||||
id: 'feat_none_001',
|
||||
featureText: 'Upcoming prompt pack roadmap',
|
||||
sortOrder: 10,
|
||||
},
|
||||
{
|
||||
id: 'feat_none_002',
|
||||
featureText: 'Preview-only release notes',
|
||||
sortOrder: 20,
|
||||
},
|
||||
{
|
||||
id: 'feat_none_003',
|
||||
featureText: 'Owner and rollout visibility',
|
||||
sortOrder: 30,
|
||||
},
|
||||
],
|
||||
tagIds: ['tag_new', 'tag_team'],
|
||||
},
|
||||
{
|
||||
id: 'tool_draft_001',
|
||||
name: 'Local Agent Kit',
|
||||
|
||||
Reference in New Issue
Block a user