module.exports = {
  stats: async function(req, res) {
    const stats = await PendingUserNotification.count({
      groupBy: ['status']
    });
    
    return res.json({
      pending: stats.find(s => s.status === 'pending').count,
      sent: stats.find(s => s.status === 'sent').count,
      failed: stats.find(s => s.status === 'failed').count
    });
  }
};