a
This commit is contained in:
@@ -125,6 +125,16 @@ const schema = defineSchema({
|
||||
})
|
||||
.index("by_project_createdAt", ["projectId", "createdAt"])
|
||||
.index("by_dataSource_createdAt", ["dataSourceId", "createdAt"]),
|
||||
analysisSections: defineTable({
|
||||
analysisId: v.id("analyses"),
|
||||
sectionKey: v.string(),
|
||||
items: v.any(),
|
||||
lastPrompt: v.optional(v.string()),
|
||||
source: v.union(v.literal("ai"), v.literal("manual"), v.literal("mixed")),
|
||||
updatedAt: v.number(),
|
||||
})
|
||||
.index("by_analysis", ["analysisId"])
|
||||
.index("by_analysis_section", ["analysisId", "sectionKey"]),
|
||||
opportunities: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
analysisId: v.optional(v.id("analyses")),
|
||||
@@ -147,6 +157,15 @@ const schema = defineSchema({
|
||||
.index("by_project_status", ["projectId", "status"])
|
||||
.index("by_project_createdAt", ["projectId", "createdAt"])
|
||||
.index("by_project_url", ["projectId", "url"]),
|
||||
seenUrls: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
url: v.string(),
|
||||
firstSeenAt: v.number(),
|
||||
lastSeenAt: v.number(),
|
||||
source: v.optional(v.string()),
|
||||
})
|
||||
.index("by_project_url", ["projectId", "url"])
|
||||
.index("by_project_lastSeen", ["projectId", "lastSeenAt"]),
|
||||
analysisJobs: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
dataSourceId: v.optional(v.id("dataSources")),
|
||||
|
||||
Reference in New Issue
Block a user