feat: Implement data source management and analysis flow, allowing users to add and analyze websites for project opportunities.
This commit is contained in:
@@ -22,6 +22,8 @@ const schema = defineSchema({
|
||||
v.literal("completed"),
|
||||
v.literal("failed")
|
||||
),
|
||||
lastAnalyzedAt: v.optional(v.number()),
|
||||
lastError: v.optional(v.string()),
|
||||
analysisResults: v.optional(
|
||||
v.object({
|
||||
features: v.array(v.string()),
|
||||
@@ -31,7 +33,7 @@ const schema = defineSchema({
|
||||
})
|
||||
),
|
||||
metadata: v.optional(v.any()),
|
||||
}),
|
||||
}).index("by_project_url", ["projectId", "url"]),
|
||||
analyses: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
dataSourceId: v.id("dataSources"),
|
||||
@@ -121,7 +123,8 @@ const schema = defineSchema({
|
||||
})),
|
||||
scrapedAt: v.string(),
|
||||
})
|
||||
.index("by_project_createdAt", ["projectId", "createdAt"]),
|
||||
.index("by_project_createdAt", ["projectId", "createdAt"])
|
||||
.index("by_dataSource_createdAt", ["dataSourceId", "createdAt"]),
|
||||
opportunities: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
analysisId: v.optional(v.id("analyses")),
|
||||
|
||||
Reference in New Issue
Block a user