fetch and save booking reservations

This commit is contained in:
Bilal Catic
2019-05-31 06:15:19 +02:00
parent f2141544af
commit 727c6c940f
5 changed files with 95 additions and 0 deletions

21
models/doorLockEvent.js Normal file
View File

@@ -0,0 +1,21 @@
'use strict';
const { USER_LOCKED_DOOR, USER_UNLOCKED_DOOR } = require('../constants/constants');
module.exports = (sequelize, DataTypes) => {
const doorLockEvent = sequelize.define('doorLockEvent', {
memberName: DataTypes.TEXT,
memberNumber: DataTypes.INTEGER,
memberId: DataTypes.TEXT,
event: {
type: DataTypes.ENUM,
values: [USER_LOCKED_DOOR, USER_UNLOCKED_DOOR]
},
date: DataTypes.DATEONLY,
time: DataTypes.TIME,
}, {});
doorLockEvent.associate = function(models) {
// associations can be defined here
};
return doorLockEvent;
};