Finished guestbook and gallery. started diary
This commit is contained in:
35
backend/models/community/diary_history.js
Normal file
35
backend/models/community/diary_history.js
Normal file
@@ -0,0 +1,35 @@
|
||||
import { Model, DataTypes } from 'sequelize';
|
||||
import { sequelize } from '../../utils/sequelize.js';
|
||||
|
||||
class DiaryHistory extends Model { }
|
||||
|
||||
DiaryHistory.init({
|
||||
diaryId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
userId: {
|
||||
type: DataTypes.INTEGER,
|
||||
allowNull: false,
|
||||
},
|
||||
oldText: {
|
||||
type: DataTypes.TEXT,
|
||||
allowNull: false,
|
||||
},
|
||||
oldCreatedAt: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: false,
|
||||
},
|
||||
oldUpdatedAt: {
|
||||
type: DataTypes.DATE,
|
||||
allowNull: false,
|
||||
},
|
||||
}, {
|
||||
sequelize,
|
||||
modelName: 'DiaryHistory',
|
||||
tableName: 'diary_history',
|
||||
schema: 'community',
|
||||
timestamps: false,
|
||||
});
|
||||
|
||||
export default DiaryHistory;
|
||||
Reference in New Issue
Block a user