'use strict'; const { unlockedIncidentLevelsPrices } = require('../constants/constants'); module.exports = (sequelize, DataTypes) => { const unlockedIncident = sequelize.define('unlockedIncident', { reservationId: DataTypes.TEXT, memberId: DataTypes.TEXT, resourceId: DataTypes.TEXT, bookingStart: DataTypes.DATE, bookingEnd: DataTypes.DATE, incidentLevel: { type: DataTypes.ENUM, values: [ unlockedIncidentLevelsPrices.UNLOCKED_0.title, unlockedIncidentLevelsPrices.UNLOCKED_1.title, unlockedIncidentLevelsPrices.UNLOCKED_2.title, unlockedIncidentLevelsPrices.UNLOCKED_3.title, unlockedIncidentLevelsPrices.UNLOCKED_4.title, unlockedIncidentLevelsPrices.UNLOCKED_5.title, ] }, incidentLevelPrice: DataTypes.FLOAT, }, {}); unlockedIncident.associate = function(models) { // associations can be defined here }; return unlockedIncident; };