Implemented test run editor's test case selection

This commit is contained in:
Takeshi Kimata
2024-04-13 23:36:52 +09:00
parent f78308343e
commit aa35d28801
3 changed files with 106 additions and 15 deletions

View File

@@ -0,0 +1,31 @@
function defineRunCase(sequelize, DataTypes) {
const RunCase = sequelize.define("RunCase", {
runId: {
type: DataTypes.INTEGER,
allowNull: false,
},
caseId: {
type: DataTypes.INTEGER,
allowNull: false,
},
status: {
type: DataTypes.INTEGER,
allowNull: false,
},
});
RunCase.associate = (models) => {
RunCase.belongsTo(models.Run, {
foreignKey: "runId",
onDelete: "CASCADE",
});
RunCase.belongsTo(models.Case, {
foreignKey: "caseId",
onDelete: "CASCADE",
});
};
return RunCase;
}
module.exports = defineRunCase;