import { Model, DataTypes } from 'sequelize'; import { sequelize } from '../../../utils/sequelize.js'; class PoliticalAppointment extends Model {} PoliticalAppointment.init( { appointerCharacterId: { type: DataTypes.INTEGER, allowNull: false, field: 'appointer_character_id' }, targetCharacterId: { type: DataTypes.INTEGER, allowNull: false, field: 'target_character_id' }, officeTypeId: { type: DataTypes.INTEGER, allowNull: false, field: 'office_type_id' }, regionId: { type: DataTypes.INTEGER, allowNull: false, field: 'region_id' }, status: { type: DataTypes.STRING(32), allowNull: false, defaultValue: 'completed' }, expiresAt: { type: DataTypes.DATE, allowNull: true, field: 'expires_at' }, completedPoliticalOfficeId: { type: DataTypes.INTEGER, allowNull: true, field: 'completed_political_office_id' }, }, { sequelize, modelName: 'PoliticalAppointment', tableName: 'political_appointment', schema: 'falukant_data', timestamps: true, createdAt: 'created_at', updatedAt: false, underscored: true } ); export default PoliticalAppointment;