Add follow-up status tracking slice

This commit is contained in:
2026-06-05 21:35:55 +02:00
parent 807532a0a4
commit 3f148bcec2
11 changed files with 395 additions and 11 deletions

View File

@@ -484,11 +484,14 @@ export default defineSchema({
emailSubject: v.optional(v.string()),
emailBody: v.optional(v.string()),
followUpDraft: v.optional(v.string()),
followUpDueAt: v.optional(v.number()),
parentOutreachId: v.optional(v.id("outreachRecords")),
approvalStatus: outreachApprovalStatus,
sendStatus: outreachSendStatus,
sentAt: v.optional(v.number()),
responseStatus: outreachResponseStatus,
salesStatus: outreachSalesStatus,
doNotContactUntil: v.optional(v.number()),
createdAt: v.number(),
updatedAt: v.number(),
})
@@ -502,7 +505,8 @@ export default defineSchema({
"updatedAt",
])
.index("by_sendStatus", ["sendStatus"])
.index("by_sendStatus_and_updatedAt", ["sendStatus", "updatedAt"]),
.index("by_sendStatus_and_updatedAt", ["sendStatus", "updatedAt"])
.index("by_parentOutreachId", ["parentOutreachId"]),
outreachSendAttempts: defineTable({
outreachId: v.id("outreachRecords"),