lots of changes
This commit is contained in:
@@ -138,6 +138,7 @@ const schema = defineSchema({
|
||||
opportunities: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
analysisId: v.optional(v.id("analyses")),
|
||||
searchJobId: v.optional(v.id("searchJobs")),
|
||||
url: v.string(),
|
||||
platform: v.string(),
|
||||
title: v.string(),
|
||||
@@ -145,6 +146,8 @@ const schema = defineSchema({
|
||||
relevanceScore: v.number(),
|
||||
intent: v.string(),
|
||||
status: v.string(),
|
||||
sentAt: v.optional(v.number()),
|
||||
archivedAt: v.optional(v.number()),
|
||||
suggestedApproach: v.string(),
|
||||
matchedKeywords: v.array(v.string()),
|
||||
matchedProblems: v.array(v.string()),
|
||||
@@ -156,7 +159,14 @@ const schema = defineSchema({
|
||||
})
|
||||
.index("by_project_status", ["projectId", "status"])
|
||||
.index("by_project_createdAt", ["projectId", "createdAt"])
|
||||
.index("by_project_url", ["projectId", "url"]),
|
||||
.index("by_project_url", ["projectId", "url"])
|
||||
.index("by_project_searchJob", ["projectId", "searchJobId"]),
|
||||
userActivity: defineTable({
|
||||
userId: v.id("users"),
|
||||
lastActiveDate: v.string(),
|
||||
streak: v.number(),
|
||||
updatedAt: v.number(),
|
||||
}).index("by_user", ["userId"]),
|
||||
seenUrls: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
url: v.string(),
|
||||
@@ -193,7 +203,8 @@ const schema = defineSchema({
|
||||
updatedAt: v.number(),
|
||||
})
|
||||
.index("by_project_status", ["projectId", "status"])
|
||||
.index("by_project_createdAt", ["projectId", "createdAt"]),
|
||||
.index("by_project_createdAt", ["projectId", "createdAt"])
|
||||
.index("by_dataSource_createdAt", ["dataSourceId", "createdAt"]),
|
||||
searchJobs: defineTable({
|
||||
projectId: v.id("projects"),
|
||||
status: v.union(
|
||||
|
||||
Reference in New Issue
Block a user