akf-forum/models/Message.js

17 lines
384 B
JavaScript
Raw Normal View History

2022-04-06 21:14:46 +03:00
const { Schema, model } = require("mongoose")
module.exports = model('message', new Schema({
id: { type: Number, unique: true },
authorID: Number,
threadID: Number,
author: Object,
content: String,
time: Number,
deleted: { type: Boolean, default: false },
edited: { type: Boolean, default: false },
messages: [Number],
react: Object
}))