Notification = new Mongo.Collection('notification');
Notification.allow({
  insert: function(userId, doc){
    return !!userId;
  },
  update: function(userId, doc) {
    return !!userId;
  },
  remove: function(userId, doc) {
    return !!userId;
  }
});
Audience = new SimpleSchema({
  id : {
    type: String
  },
  hasSeenNotification : {
    type: Boolean,
  }
});
NotificationSection = new SimpleSchema({
  notificationType : {
    type: String
  },
  hasSeenNotification : {
    type: Boolean,
  }
});
Notification.attachSchema(new SimpleSchema({
  actor : {
    type: String,
  },
  viewer: {
  	type: [Audience]
  },
  createdAt : {
    type: String,
    optional: true,
  },
  notification : {
  	type: [NotificationSection]
  },

}));