import { sequelize } from '../../utils/sequelize.js';
import { DataTypes } from 'sequelize';
import UserParam from './user_param.js';

const UserParamValue = sequelize.define('user_param_value', {
    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true
    },
    userParamTypeId: {
        type: DataTypes.INTEGER,
        allowNull: false
    },
    value: { 
        type: DataTypes.STRING, 
        allowNull: false 
    },
    orderId: {
        type: DataTypes.INTEGER,
        allowNull: false,
        defaultValue: 0
    }
},
{
    tableName: 'user_param_value',
    schema: 'type',
    underscored: true
}
);

export default UserParamValue;
