const mongoose = require('mongoose');
const { Schema } = mongoose;

const notificationSchema = new Schema(
    {
        title: { type: String, required: true },
        content: { type: String, required: true }, // Supports HTML/Rich Text
        isActive: { type: Boolean, default: true },
        priority: { type: Number, default: 0 }, // Higher number = higher priority
    },
    {
        timestamps: true,
    },
);

module.exports = mongoose.model('Notification', notificationSchema);
