feat: support for topic in notification

using same topic twice will restore existing notification in that topic
if any. this can be useful if you want to remind users about some
specific thing over time

Signed-off-by: Heikki Hellgren <heikki.hellgren@op.fi>
This commit is contained in:
Heikki Hellgren
2024-01-26 14:44:30 +02:00
parent dced4bbc96
commit 50c7dbde2f
10 changed files with 124 additions and 15 deletions
@@ -21,9 +21,9 @@ exports.up = async function up(knex) {
table.string('title').notNullable();
table.text('description').notNullable();
table.text('link').notNullable();
table.text('icon').nullable();
table.text('image').nullable();
table.datetime('created').notNullable();
table.text('topic').nullable();
table.datetime('created').defaultTo(knex.fn.now()).notNullable();
table.datetime('updated').nullable();
table.datetime('read').nullable();
table.datetime('done').nullable();
table.boolean('saved').defaultTo(false).notNullable();