Cretate delete project confirm dialog

This commit is contained in:
Takeshi Kimata
2024-05-26 14:46:00 +09:00
parent 691684e9b7
commit 3ce68ebd30
7 changed files with 25 additions and 8 deletions

View File

@@ -24,7 +24,9 @@ function defineProject(sequelize, DataTypes) {
});
Project.associate = (models) => {
Project.hasMany(models.Folder, { foreignKey: 'projectId' });
Project.belongsTo(models.User, { foreignKey: 'userId', onDelete: 'CASCADE' });
Project.hasMany(models.Folder, { foreignKey: 'projectId', onDelete: 'CASCADE' });
Project.hasMany(models.Run, { foreignKey: 'projectId', onDelete: 'CASCADE' });
};
return Project;