import { Model, DataTypes } from 'sequelize';
import { sequelize } from '../../../utils/sequelize.js';

class PoliticalOfficeHistory extends Model { }

PoliticalOfficeHistory.init(
    {
        characterId: {
            type: DataTypes.INTEGER,
            allowNull: false},
        officeTypeId: {
            type: DataTypes.INTEGER,
            allowNull: false},
        startDate: {
            type: DataTypes.DATE,
            allowNull: false},
        endDate: {
            type: DataTypes.DATE,
            allowNull: false}
    },
    {
        sequelize,
        modelName: 'PoliticalOfficeHistory',
        tableName: 'political_office_history',
        schema: 'falukant_log',
        timestamps: true,
        underscored: true}
);

export default PoliticalOfficeHistory;
