kba / models /Counter.js
ShieldX's picture
Upload 24 files
e14bacb verified
raw
history blame contribute delete
349 Bytes
const mongoose = require('mongoose');
const counterSchema = new mongoose.Schema({
_id: { type: String, required: true }, // This stores the key like "Silver_181225"
seq: { type: Number, default: 0 } // This stores the running count
});
// Important: We export the Model directly
module.exports = mongoose.model('Counter', counterSchema);