export const notifications = pgTable("notifications", {
id: uuid().defaultRandom().primaryKey().notNull(),
userId: uuid("user_id").notNull(),
createdAt: timestamp("created_at", { withTimezone: true, mode: 'string' }).defaultNow().notNull(),
body: text().notNull(),
}, (table) => {
return {
notificationsUserIdFkey: foreignKey({
columns: [table.userId],
foreignColumns: [users.id],
name: "notifications_user_id_fkey"
}),
}
});
export const notifications = pgTable("notifications", {
id: uuid().defaultRandom().primaryKey().notNull(),
userId: uuid("user_id").notNull(),
createdAt: timestamp("created_at", { withTimezone: true, mode: 'string' }).defaultNow().notNull(),
body: text().notNull(),
}, (table) => {
return {
notificationsUserIdFkey: foreignKey({
columns: [table.userId],
foreignColumns: [users.id],
name: "notifications_user_id_fkey"
}),
}
});