Fixed id, userId data type

This commit is contained in:
Rykkel
2024-07-31 01:16:25 +08:00
parent 7f1a46d91c
commit 25d3044348
4 changed files with 31 additions and 14 deletions

View File

@@ -8,7 +8,7 @@ module.exports = (sequelize, DataTypes) => {
},
title: {
type: DataTypes.STRING(100),
allowNull: false
allowNull: false,
},
postImage: {
type: DataTypes.BLOB("long"),
@@ -16,14 +16,15 @@ module.exports = (sequelize, DataTypes) => {
},
content: {
type: DataTypes.TEXT,
allowNull: false
allowNull: false,
},
userId: {
type: DataTypes.UUID,
allowNull: false,
},
}, {
tableName: 'posts'
tableName: 'posts',
timestamps: true,
});
return Post;