Some fixes and additions

This commit is contained in:
Torsten Schulz
2025-07-09 14:28:35 +02:00
parent 5029be81e9
commit fceea5b7fb
32 changed files with 4373 additions and 1294 deletions

View File

@@ -0,0 +1,32 @@
import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';
class ElectionHistory extends Model { }
ElectionHistory.init({
electionId: {
type: DataTypes.INTEGER,
allowNull: false,
},
politicalOfficeTypeId: {
type: DataTypes.INTEGER,
allowNull: false,
},
electionDate: {
type: DataTypes.DATE,
allowNull: false,
},
electionResult: {
type: DataTypes.JSON,
allowNull: false,
}
}, {
sequelize,
modelName: 'ElectionHistory',
tableName: 'election_history',
schema: 'falukant_log',
timestamps: true,
underscored: true,
});
export default ElectionHistory;