create steps

This commit is contained in:
Takeshi Kimata
2024-02-29 20:47:46 +09:00
parent b36e8f3c7f
commit 22c951db07
8 changed files with 189 additions and 26 deletions

20
backend/models/steps.js Normal file
View File

@@ -0,0 +1,20 @@
function defineStep(sequelize, DataTypes) {
const Step = sequelize.define("Step", {
step: {
type: DataTypes.STRING,
allowNull: false,
},
result: {
type: DataTypes.STRING,
allowNull: false,
},
});
Step.associate = (models) => {
Step.belongsToMany(models.Case, { through: "Case_Step" });
};
return Step;
}
module.exports = defineStep;