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

class BuyableHouse extends Model { }

BuyableHouse.init({
    roofCondition: {
        type: DataTypes.INTEGER,
        allowNull: false,
        defaultValue: 100
    },
    floorCondition: {
        type: DataTypes.INTEGER,
        allowNull: false,
        defaultValue: 100
    },
    wallCondition: {
        type: DataTypes.INTEGER,
        allowNull: false,
        defaultValue: 100
    },
    windowCondition: {
        type: DataTypes.INTEGER,
        allowNull: false,
        defaultValue: 100
    },
    houseTypeId: {
        type: DataTypes.INTEGER,
        allowNull: false}
}, {
    sequelize,
    modelName: 'BuyableHouse',
    tableName: 'buyable_house',
    schema: 'falukant_data',
    timestamps: false,
    underscored: true});

export default BuyableHouse;
