create steps
This commit is contained in:
20
backend/models/steps.js
Normal file
20
backend/models/steps.js
Normal 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;
|
||||
Reference in New Issue
Block a user