import { DatabaseHelper } from "./DatabaseHelper"; /** * Notifications helper * * @author Pierre HUBERT */ const NOTIFICATIONS_TABLE = "comunic_notifications"; export class NotificationsHelper { /** * Count the number of unread notifications of a user * * @param userID Target user ID */ public static async CountUnread(userID: number) : Promise { return await DatabaseHelper.Count({ table: NOTIFICATIONS_TABLE, where: { dest_user_id: userID, seen: 0 } }); } }