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

class HouseType extends Model { }

HouseType.init({
    labelTr: {
        type: DataTypes.STRING,
        allowNull: false},
    cost: {
        type: DataTypes.INTEGER,
        allowNull: false},
    position: {
        type: DataTypes.INTEGER,
        allowNull: false},
    minimumNobleTitle: {
        type: DataTypes.INTEGER,
        allowNull: false}}, {
    sequelize,
    modelName: 'HouseType',
    tableName: 'house',
    schema: 'falukant_type',
    timestamps: false,
    underscored: true,
    indexes: [
        {
            unique: true,
            fields: ['label_tr']
        }
    ]});

export default HouseType;
