feat: add notification UI
showPopup was also refactored to be better
This commit is contained in:
15
migrations/0051_add-notification-tables.up.sql
Normal file
15
migrations/0051_add-notification-tables.up.sql
Normal file
@ -0,0 +1,15 @@
|
||||
CREATE TABLE notification_object (
|
||||
notification_object_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
entity_id uuid NOT NULL,
|
||||
action_type int NOT NULL,
|
||||
actor_id uuid NOT NULL,
|
||||
entity_type int NOT NULL,
|
||||
created_on timestamptz NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE notification (
|
||||
notification_id uuid PRIMARY KEY DEFAULT uuid_generate_v4(),
|
||||
notification_object_id uuid REFERENCES notification_object(notification_object_id) ON DELETE CASCADE,
|
||||
notifier_id uuid NOT NULL REFERENCES user_account(user_id) ON DELETE CASCADE,
|
||||
read boolean NOT NULL DEFAULT false
|
||||
);
|
Reference in New Issue
Block a user