You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
srap/src/models/task-in-progress.js

21 lines
433 B
JavaScript

"use strict";
const { Model } = require("objection");
module.exports = function ({ db }) {
return class TaskInProgress extends Model {
static tableName = "tasksInProgress";
static idColumn = [ "task", "itemId" ];
static get relationMappings() {
return {
item: {
relation: Model.BelongsToOneRelation,
modelClass: db.Item,
join: { from: "tasksInProgress.itemId", to: "item.id" }
}
};
};
}
};