import { sql } from '@pgtyped/query'; import { IInsertNotificationQuery, IInsertNotificationsQuery, IGetAllNotificationsQuery, } from './notifications.types'; // Table order is (user_id, payload, type) export const insertNotifications = sql` INSERT INTO notifications (payload, user_id, type) values $$params(payload, user_id, type) `; export const insertNotification = sql` INSERT INTO notifications (payload, user_id, type) values $notification(payload, user_id, type) `; export const getAllNotifications = sql` SELECT * FROM notifications `;