added notes to the frontend
This commit is contained in:
@@ -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);
|
||||
Reference in New Issue
Block a user