Added cold-persistance to Channel Chat Buffer via periodic DB saves based on chat activity.

This commit is contained in:
rainbow napkin 2025-07-23 01:05:39 -04:00
parent 366df357b8
commit c64b315fdf
7 changed files with 124 additions and 5 deletions

View file

@ -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;