Initial commit
This commit is contained in:
13
backend/models/Announcement.js
Normal file
13
backend/models/Announcement.js
Normal file
@@ -0,0 +1,13 @@
|
||||
const mongoose = require("mongoose");
|
||||
|
||||
const announcementSchema = new mongoose.Schema(
|
||||
{
|
||||
title: { type: String, required: true },
|
||||
content: { type: String },
|
||||
priority: { type: Number, default: 0 },
|
||||
active: { type: Boolean, default: true },
|
||||
},
|
||||
{ timestamps: true }
|
||||
);
|
||||
|
||||
module.exports = mongoose.model("Announcement", announcementSchema);
|
||||
Reference in New Issue
Block a user