added notes to the frontend

This commit is contained in:
QkoSad
2022-12-11 11:28:40 +02:00
parent 475f924381
commit 88f04e2734
11 changed files with 538 additions and 16 deletions
+32
View File
@@ -0,0 +1,32 @@
const mongoose = require("mongoose");
const noteSchema = mongoose.Schema(
{
user: {
type: mongoose.Schema.Types.ObjectId,
required: true,
ref: "User",
},
ticket: {
type: mongoose.Schema.Types.ObjectId,
required: true,
ref: "Ticket",
},
text: {
type: String,
required: [true, "Please add some text"],
},
isStaff: {
type: Boolean,
default: false,
},
staffId: {
type: String,
},
},
{
timestamps: true,
}
);
module.exports = mongoose.model("Note", noteSchema);