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

class UserHouse extends Model { }

UserHouse.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
    },
    userId: {
        type: DataTypes.INTEGER,
        allowNull: false
    }
}, {
    sequelize,
    modelName: 'UserHouse',
    tableName: 'user_house',
    schema: 'falukant_data',
    timestamps: false,
    underscored: true});

export default UserHouse;
