Calculate door lock charges
This commit is contained in:
29
models/unlockedIncident.js
Normal file
29
models/unlockedIncident.js
Normal 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;
|
||||
};
|
||||
Reference in New Issue
Block a user