added community, CRUD

This commit is contained in:
Rykkel
2024-06-28 13:35:01 +08:00
parent cb27abcba8
commit aa8ce41e70
11 changed files with 1764 additions and 806 deletions

15
server/models/Post.js Normal file
View File

@@ -0,0 +1,15 @@
module.exports = (sequelize, DataTypes) => {
const Post = sequelize.define("Post", {
title: {
type: DataTypes.STRING(100),
allowNull: false
},
content: {
type: DataTypes.TEXT,
allowNull: false
}
}, {
tableName: 'posts'
});
return Post;
}