Added cold-persistance to Channel Chat Buffer via periodic DB saves based on chat activity.
This commit is contained in:
parent
366df357b8
commit
c64b315fdf
7 changed files with 124 additions and 5 deletions
|
|
@ -17,6 +17,11 @@ along with this program. If not, see <https://www.gnu.org/licenses/>.*/
|
|||
//NPM Imports
|
||||
const {mongoose} = require('mongoose');
|
||||
|
||||
const linkSchema = new mongoose.Schema({
|
||||
link: mongoose.SchemaTypes.String,
|
||||
type: mongoose.SchemaTypes.String
|
||||
});
|
||||
|
||||
const chatSchema = new mongoose.Schema({
|
||||
user: {
|
||||
type: mongoose.SchemaTypes.String,
|
||||
|
|
@ -39,10 +44,9 @@ const chatSchema = new mongoose.Schema({
|
|||
required: true,
|
||||
},
|
||||
links: {
|
||||
type: [mongoose.SchemaTypes.Number],
|
||||
type: [linkSchema],
|
||||
required: true,
|
||||
},
|
||||
});
|
||||
|
||||
|
||||
module.exports = chatSchema;
|
||||
Loading…
Add table
Add a link
Reference in a new issue