This commit is contained in:
Harini312821
2024-07-19 12:01:53 +08:00
7 changed files with 253 additions and 13 deletions

View File

@@ -1,9 +1,19 @@
module.exports = (sequelize, DataTypes) => {
const Post = sequelize.define("Post", {
id: {
type: DataTypes.UUID,
defaultValue: DataTypes.UUIDV4,
allowNull: false,
primaryKey: true,
},
title: {
type: DataTypes.STRING(100),
allowNull: false
},
postImage: {
type: DataTypes.BLOB("long"),
allowNull: true,
},
content: {
type: DataTypes.TEXT,
allowNull: false