added notes to the frontend

This commit is contained in:
QkoSad committed 2022-12-11 11:28:40 +02:00
1 parent 475f924381
commit 88f04e2734
11 files changed
+538 -16

No files matched your search

+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);