Calculate door lock charges

This commit is contained in:
Senad Uka
2019-06-14 17:41:09 +02:00
parent 8e4eb0cf1f
commit 393e9b8aec
37 changed files with 1736 additions and 66 deletions

View File

@@ -0,0 +1,29 @@
'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;
};