create folders table

This commit is contained in:
Takeshi Kimata
2024-02-12 12:20:37 +09:00
parent 8de8d06399
commit 197a011c4c
13 changed files with 261 additions and 32 deletions

24
backend/models/folders.js Normal file
View File

@@ -0,0 +1,24 @@
function defineFolder(sequelize, DataTypes) {
const Folder = sequelize.define("Folder", {
name: {
type: DataTypes.STRING,
allowNull: false,
},
detail: {
type: DataTypes.STRING,
allowNull: true,
},
parentFolderId: {
type: DataTypes.INTEGER,
allowNull: true,
},
projectId: {
type: DataTypes.INTEGER,
allowNull: false,
},
});
return Folder;
}
module.exports = defineFolder;

View File

@@ -6,7 +6,7 @@ function defineProject(sequelize, DataTypes) {
},
detail: {
type: DataTypes.STRING,
allowNull: false,
allowNull: true,
},
});