Appearance
notifications database schema
Generated from the EF Core model of Cadence.Apps.Notifications.Infrastructure.Persistence.NotificationsDbContext, not from a live database. Unqualified tables live in the notifications schema.
| Table | Entity | Columns |
|---|---|---|
notifications.InboxState | InboxState | 11 |
notifications.OutboxMessage | OutboxMessage | 21 |
notifications.OutboxState | OutboxState | 6 |
notifications.audit_log_entries | AuditLogEntry | 12 |
notifications.notification_audit_logs | NotificationAuditLog | 7 |
notifications.notification_deliveries | NotificationDelivery | 10 |
notifications.notification_records | NotificationRecord | 17 |
notifications.InboxState
Entity: InboxState
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | bigint | no | PK | |
Consumed | timestamp with time zone | yes | ||
ConsumerId | uuid | no | ||
Delivered | timestamp with time zone | yes | ||
ExpirationTime | timestamp with time zone | yes | ||
LastSequenceNumber | bigint | yes | ||
LockId | uuid | no | ||
MessageId | uuid | no | ||
ReceiveCount | integer | no | ||
Received | timestamp with time zone | no | ||
RowVersion | bytea | yes |
Indexes:
AK_InboxState_MessageId_ConsumerId: unique constraint (MessageId,ConsumerId)IX_InboxState_Delivered: (Delivered)
notifications.OutboxMessage
Entity: OutboxMessage
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
SequenceNumber | bigint | no | PK | |
Body | text | no | ||
ContentType | character varying(256) | no | ||
ConversationId | uuid | yes | ||
CorrelationId | uuid | yes | ||
DestinationAddress | character varying(256) | yes | ||
EnqueueTime | timestamp with time zone | yes | ||
ExpirationTime | timestamp with time zone | yes | ||
FaultAddress | character varying(256) | yes | ||
Headers | text | yes | ||
InboxConsumerId | uuid | yes | ||
InboxMessageId | uuid | yes | ||
InitiatorId | uuid | yes | ||
MessageId | uuid | no | ||
MessageType | text | no | ||
OutboxId | uuid | yes | ||
Properties | text | yes | ||
RequestId | uuid | yes | ||
ResponseAddress | character varying(256) | yes | ||
SentTime | timestamp with time zone | no | ||
SourceAddress | character varying(256) | yes |
Foreign keys:
FK_OutboxMessage_InboxState_InboxMessageId_InboxConsumerId: (InboxMessageId,InboxConsumerId) referencesnotifications.InboxState(MessageId,ConsumerId), on delete no actionFK_OutboxMessage_OutboxState_OutboxId: (OutboxId) referencesnotifications.OutboxState(OutboxId), on delete no action
Indexes:
IX_OutboxMessage_EnqueueTime: (EnqueueTime)IX_OutboxMessage_ExpirationTime: (ExpirationTime)IX_OutboxMessage_InboxMessageId_InboxConsumerId_SequenceNumber: unique (InboxMessageId,InboxConsumerId,SequenceNumber)IX_OutboxMessage_OutboxId_SequenceNumber: unique (OutboxId,SequenceNumber)
notifications.OutboxState
Entity: OutboxState
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
OutboxId | uuid | no | PK | |
Created | timestamp with time zone | no | ||
Delivered | timestamp with time zone | yes | ||
LastSequenceNumber | bigint | yes | ||
LockId | uuid | no | ||
RowVersion | bytea | yes |
Indexes:
IX_OutboxState_Created: (Created)
notifications.audit_log_entries
Entity: AuditLogEntry
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | uuid | no | PK | |
Action | character varying(50) | no | ||
BlockHash | character varying(64) | no | ||
ChangesJson | text | yes | ||
EntityId | character varying(255) | no | ||
EntityName | character varying(255) | no | ||
PredecessorHash | character varying(64) | no | ||
ReasonForChange | character varying(1000) | no | ||
Timestamp | timestamp with time zone | no | ||
UserId | character varying(255) | no | ||
VersionIndex | bigint | no | ||
tenant_id | uuid | no |
Indexes:
IX_audit_log_entries_EntityName_Timestamp: (EntityName,Timestamp)IX_audit_log_entries_tenant_id: (tenant_id)
notifications.notification_audit_logs
Entity: NotificationAuditLog
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
Action | character varying(50) | no | ||
Details | character varying(1000) | no | ||
Timestamp | timestamp with time zone | no | ||
UserId | character varying(255) | no | ||
UserRole | character varying(255) | no | ||
tenant_id | uuid | no |
Indexes:
IX_notification_audit_logs_Timestamp: (Timestamp)IX_notification_audit_logs_UserId: (UserId)IX_notification_audit_logs_tenant_id: (tenant_id)
notifications.notification_deliveries
Entity: NotificationDelivery
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
Attempts | integer | no | ||
Channel | character varying(50) | no | ||
CompletedAt | timestamp with time zone | yes | ||
LastError | character varying(1000) | yes | ||
NextRetryAt | timestamp with time zone | yes | ||
NotificationId | character varying(36) | no | ||
RetryEligible | boolean | no | ||
Status | character varying(50) | no | ||
tenant_id | uuid | no |
Indexes:
IX_notification_deliveries_NotificationId: (NotificationId)IX_notification_deliveries_tenant_id: (tenant_id)
notifications.notification_records
Entity: NotificationRecord
| Column | Type | Null | Default | Key |
|---|---|---|---|---|
Id | character varying(36) | no | PK | |
Category | character varying(50) | no | ||
Channels | character varying(255) | no | ||
CreatedAt | timestamp with time zone | no | ||
CreatedBy | character varying(255) | no | ||
DeliveryState | character varying(50) | no | ||
MessageContent | text | no | ||
Priority | character varying(50) | no | ||
ReasonForChange | character varying(1000) | no | ||
RecipientRoleId | character varying(255) | yes | ||
RecipientUserId | character varying(255) | yes | ||
RelatedEntityId | character varying(255) | yes | ||
RelatedEntityType | character varying(255) | yes | ||
Retries | integer | no | ||
Status | character varying(50) | no | ||
VersionIndex | integer | no | ||
tenant_id | uuid | no |
Indexes:
IX_notification_records_RecipientRoleId: (RecipientRoleId)IX_notification_records_RecipientUserId: (RecipientUserId)IX_notification_records_tenant_id: (tenant_id)