Untitled

mail@pastecode.io avatar
unknown
plain_text
12 days ago
578 B
2
Indexable
Never
const mongoose = require('mongoose');

const NotificationSchema = new mongoose.Schema(
  {
    content: {
        type: String,
        required: [true, 'content is require!'],
    },
    type : {
        type : String,
        required: [true, 'type of notification is require!'],
    },
    vu: {
        type: Boolean,
        default: false,
    }
  },
  {
    timestamps: true // Ajoute automatiquement les champs createdAt et updatedAt
  }
);

const Notification = mongoose.model('Notification', NotificationSchema);

module.exports = Notification;
Leave a Comment