feat: enhance machine insights and solidify admin workflows
This commit is contained in:
parent
ac986410a3
commit
4c228e908a
7 changed files with 286 additions and 35 deletions
|
|
@ -274,6 +274,19 @@ export default defineSchema({
|
|||
.index("by_tenant_assigned_email", ["tenantId", "assignedUserEmail"])
|
||||
.index("by_auth_email", ["authEmail"]),
|
||||
|
||||
machineAlerts: defineTable({
|
||||
tenantId: v.string(),
|
||||
machineId: v.id("machines"),
|
||||
companyId: v.optional(v.id("companies")),
|
||||
kind: v.string(),
|
||||
message: v.string(),
|
||||
severity: v.string(),
|
||||
createdAt: v.number(),
|
||||
})
|
||||
.index("by_machine_created", ["machineId", "createdAt"])
|
||||
.index("by_tenant_created", ["tenantId", "createdAt"])
|
||||
.index("by_tenant_machine", ["tenantId", "machineId"]),
|
||||
|
||||
machineTokens: defineTable({
|
||||
tenantId: v.string(),
|
||||
machineId: v.id("machines"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue