mirror of
https://github.com/atlanticbiomedical/biomedjs.git
synced 2025-07-02 00:47:26 -04:00
Initial Commit
This commit is contained in:
12
app/model/counter.js
Normal file
12
app/model/counter.js
Normal file
@ -0,0 +1,12 @@
|
||||
var mongoose = require('mongoose'),
|
||||
Schema = mongoose.Schema,
|
||||
ObjectId = Schema.ObjectId;
|
||||
|
||||
var counterSchema = new Schema({
|
||||
name: String,
|
||||
seq: { type: Number, default: 0 }
|
||||
});
|
||||
|
||||
counterSchema.index({ field: 1, model: 1 }, { unique: true, required: true, index: -1 });
|
||||
|
||||
module.exports = mongoose.model('Counter', counterSchema);
|
Reference in New Issue
Block a user