akf-forum/models/Thread.js

15 lines
290 B
JavaScript
Raw Normal View History

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