1 import { values } from 'lodash'
3 import { JOB_STATES } from '../initializers'
5 // ---------------------------------------------------------------------------
7 module.exports = function (sequelize, DataTypes) {
8 const Job = sequelize.define('Job',
11 type: DataTypes.ENUM(values(JOB_STATES)),
15 type: DataTypes.STRING,
38 // ---------------------------------------------------------------------------
40 function listWithLimit (limit, state, callback) {
51 return this.findAll(query).asCallback(callback)