Skip to content

Instantly share code, notes, and snippets.

@PatrickKalkman
Created January 11, 2020 10:58
Show Gist options
  • Save PatrickKalkman/17000bb2a466223fc3d9f60eedb23bc8 to your computer and use it in GitHub Desktop.
Save PatrickKalkman/17000bb2a466223fc3d9f60eedb23bc8 to your computer and use it in GitHub Desktop.
const mongoose = require('mongoose');
const jobSchema = new mongoose.Schema({
name: { type: String, required: true },
encodingType: { type: String, required: true },
inputFolder: { type: String, required: true },
inputAsset: { type: String, required: true },
outputFolder: { type: String, required: true },
outputAsset: { type: String, required: true },
status: { type: String, required: false },
statusMessage: { type: String, required: false },
priority: { type: Number, required: false },
}, { timestamps: true });
jobSchema.index({ status: 1 });
jobSchema.index({ name: 1 });
module.exports = mongoose.model('Job', jobSchema);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment