Files
yourpart3/backend/models/community/diary_history.js
Torsten Schulz (local) 1ab9407e79
All checks were successful
Deploy to production / deploy (push) Successful in 2m56s
Refactor code structure for improved readability and maintainability; optimize performance across multiple modules.
2026-07-21 09:08:15 +02:00

30 lines
719 B
JavaScript
Executable File

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,
underscored: true});
export default DiaryHistory;