Files
yourpart3/backend/models/falukant/predefine/political_office_prerequisite.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

31 lines
790 B
JavaScript
Executable File

// models/falukant/predefine/political_office_prerequisite.js
import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';
class PoliticalOfficePrerequisite extends Model {}
PoliticalOfficePrerequisite.init({
id: {
type: DataTypes.INTEGER,
primaryKey: true,
autoIncrement: true},
// Neu: Feld heißt jetzt eindeutig "office_type_id"
officeTypeId: {
type: DataTypes.INTEGER,
field: 'office_type_id',
allowNull: false},
prerequisite: {
type: DataTypes.JSONB,
allowNull: false}}, {
sequelize,
modelName: 'PoliticalOfficePrerequisite',
tableName: 'political_office_prerequisite',
schema: 'falukant_predefine',
timestamps: false,
underscored: true});
export default PoliticalOfficePrerequisite;