Commit 166726fe authored by Balasuriya D.A.M.'s avatar Balasuriya D.A.M.

Message Schema Backend

parent a8f6d026
const mongoose = require("mongoose");
const messageModel = mongoose.Schema({
sender: { type: mongoose.Schema.Types.ObjectId, ref: "User" },
content: { type: String, trim: true },
chat: { type: mongoose.Schema.Types.ObjectId, ref: "Chat" },
},
{
timestamps:true,
}
);
const Message = mongoose.model("Message", messageModel);
module.exports = Message;
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment