Finished guestbook and gallery. started diary

This commit is contained in:
Torsten Schulz
2024-09-27 07:40:06 +02:00
parent a2ee66c9de
commit c31be3f879
34 changed files with 2298 additions and 185 deletions

View 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;