'use strict';
module.exports = (sequelize, DataTypes) => {
const Service = sequelize.define('Service', {
date: {
type: DataTypes.DATEONLY,
defaultValue: DataTypes.NOW,
primaryKey: true
},
sandwich1Busy: {
type: DataTypes.BOOLEAN,
defaultValue: false,
allowNull: false
sandwich2Busy: {
sandwich3Busy: {
}
}, {
tableName: "Services"
});
Service.associate = function(models) {
// associations can be defined here
Service.hasOne(models.User, {
as: "sandwich1"
as: "sandwich2"
as: "sandwich3"
as: "commi1"
as: "commi2"
})
};
return Service;