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.
20 lines
395 B
JavaScript
20 lines
395 B
JavaScript
"use strict";
|
|
|
|
const { Model } = require("objection");
|
|
|
|
module.exports = function ({ db }) {
|
|
return class Failure extends Model {
|
|
static tableName = "failures";
|
|
|
|
static get relationMappings() {
|
|
return {
|
|
taskResult: {
|
|
relation: Model.BelongsToOneRelation,
|
|
modelClass: db.TaskResult,
|
|
join: { from: "failures.taskResultId", to: "taskResults.id" }
|
|
}
|
|
};
|
|
};
|
|
}
|
|
};
|