diff --git a/models/notifications.go b/models/notifications.go index a37a3698..706a97fa 100644 --- a/models/notifications.go +++ b/models/notifications.go @@ -109,11 +109,17 @@ type NotificationSendHistory struct { // ID of the resource this notification is for ResourceID uuid.UUID `json:"resource_id"` - // ID of the person this notification is for. - PersonID *uuid.UUID `json:"person_id"` + // ID of the team this notification was dispatched to. + TeamID *uuid.UUID `json:"team_id,omitempty"` + + // ID of the person this notification was dispatched to. + PersonID *uuid.UUID `json:"person_id,omitempty"` + + // ID of the connection this notification was dispatched to. + ConnectionID *uuid.UUID `json:"connection_id,omitempty"` // The run created by this notification - PlaybookRunID *uuid.UUID `json:"playbook_run_id"` + PlaybookRunID *uuid.UUID `json:"playbook_run_id,omitempty"` timeStart time.Time } diff --git a/schema/notifications.hcl b/schema/notifications.hcl index aac4efe8..6104745c 100644 --- a/schema/notifications.hcl +++ b/schema/notifications.hcl @@ -184,8 +184,19 @@ table "notification_send_history" { comment = "The resource this notification is for" } column "person_id" { - null = true - type = uuid + null = true + type = uuid + comment = "recipient person" + } + column "team_id" { + null = true + type = uuid + comment = "recipient team" + } + column "connection_id" { + null = true + type = uuid + comment = "recipient connection" } column "playbook_run_id" { null = true @@ -247,8 +258,8 @@ table "notification_silences" { type = text } column "selectors" { - null = true - type = jsonb + null = true + type = jsonb comment = "list of resource selectors" } column "error" {