Untitled
unknown
plain_text
10 months ago
578 B
5
Indexable
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;
Editor is loading...
Leave a Comment