AsterionDocumentation v0.4.1

Notifications and reports

Tables of the area Notifications and reports and their relations
Notifications and reports: tables and foreign keys. Dashed lines lead to tables of other areas.

notification_channels

SMTP or ntfy channels (tenant or global) with encrypted credentials and the events they receive.

11 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
tenant_idbigint(20) unsignedyestenants on delete cascade
namevarchar(255)
typevarchar(16)
configtext
eventslongtext
enabledtinyint(1)1
last_sent_attimestampyes
last_errortextyes
created_attimestampyes
updated_attimestampyes

Indexes: tenant_id

notification_logs

Sent notifications with their channel, event and result.

7 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
notification_channel_idbigint(20) unsignednotification_channels on delete cascade
eventvarchar(32)
subjectvarchar(255)
statusvarchar(16)
errortextyes
created_attimestampcurrent_timestamp()

Indexes: notification_channel_id

reports

Report definitions: product, frequency, time, timezone, formats and recipients.

16 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
tenant_idbigint(20) unsignedtenants on delete cascade
namevarchar(255)
categoryvarchar(16)
frequencyvarchar(16)
time_of_dayvarchar(5)06:00
weekdaytinyint(3) unsigned1
day_of_monthtinyint(3) unsigned1
monthtinyint(3) unsigned1
timezonevarchar(255)UTC
formatslongtext
recipientslongtext
enabledtinyint(1)1
next_run_attimestampyes
created_attimestampyes
updated_attimestampyes

Indexes: enabled, next_run_at · tenant_id

report_runs

Generated reports in the archive: period, hash chain over the files, retention date.

20 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
tenant_idbigint(20) unsignedtenants on delete cascade
report_idbigint(20) unsignedyesreports on delete set null
namevarchar(255)
categoryvarchar(16)
frequencyvarchar(16)
period_starttimestamp
period_endtimestamp
timezonevarchar(255)
changesint(10) unsigned0
triggervarchar(16)schedule
statusvarchar(16)generated
recipientslongtextyes
errortextyes
sent_attimestampyes
previous_hashvarchar(64)yes
chain_hashvarchar(64)yes
expires_attimestamp
created_attimestampyes
updated_attimestampyes

Indexes: report_id · tenant_id, id

report_files

Files of a generated report (PDF, CSV, XLSX, ODS) with their SHA-256.

9 columns
ColumnTypeNullDefaultReferences
id PKbigint(20) unsigned
report_run_idbigint(20) unsignedreport_runs on delete cascade
formatvarchar(8)
filenamevarchar(255)
mimevarchar(128)
sizebigint(20) unsigned
sha256varchar(64)
contentlongtext
created_attimestampcurrent_timestamp()

Indexes: report_run_id