const mongoose = require('mongoose')


const AnnouncementSchema = mongoose.Schema({
  title: String,
  caption: String,
  seenBy: [mongoose.ObjectId],
  expireDate: Number,
  expired: { type: Boolean, default: false },
  isForAgents: { type: Boolean, default: false },
  image: { type: String},
  public:{ type: Boolean, default:false },
  _creator: { type: mongoose.ObjectId, ref: 'User' }
})

module.exports = mongoose.model('Announcement', AnnouncementSchema)
