Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Model
- const mongoose = require('mongoose');
- const ThresholdSchema = new mongoose.Schema({
- thresholdValue: { type: Number, required: true },
- });
- mongoose.model('Threshold', ThresholdSchema);
- module.exports = mongoose.model('Threshold');
- // Seed
- module.exports = {
- /**
- * @param {Collection} db db
- */
- up: async (db) => {
- await db.collection('threshold').insert({ thresholdValue: 3.00 });
- },
- down: async (db) => {
- console.log(db);
- },
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement