feat: notification system
This commit is contained in:
1 parent
71f4f8c4c8
commit
168a951ad9
4 files changed
+27
No files matched your search
@@ -354,6 +354,20 @@ export const icons = sqliteTable("icon", {
|
||||
.references(() => iconRepositories.id, { onDelete: "cascade" }),
|
||||
});
|
||||
|
||||
export const notifications = sqliteTable("notifications", {
|
||||
id: text().notNull().primaryKey(),
|
||||
createdAt: int({ mode: "timestamp" }).notNull(),
|
||||
dismissAfterOneAcknowledgement: int({ mode: "boolean" }).default(false).notNull(),
|
||||
content: text().notNull()
|
||||
});
|
||||
|
||||
export const notificationsAcknowledgements = sqliteTable("notificationAcknowledgements", {
|
||||
id: text().notNull().primaryKey(),
|
||||
acknowledgedAt: int({ mode: "timestamp" }).notNull(),
|
||||
userId: text().notNull().references(() => users.id, { onDelete: "cascade" }),
|
||||
notificationId: text().notNull().references(() => notifications.id, { onDelete: "cascade" }),
|
||||
});
|
||||
|
||||
export const iconRepositories = sqliteTable("iconRepository", {
|
||||
id: text().notNull().primaryKey(),
|
||||
slug: text().notNull(),
|
||||
|
||||
Reference in new issue
Block a user