Created
January 11, 2020 10:58
-
-
Save PatrickKalkman/17000bb2a466223fc3d9f60eedb23bc8 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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