-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: added new tables holiday and leave
- Loading branch information
1 parent
098bd63
commit 5c9d64d
Showing
4 changed files
with
53 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,22 @@ | ||
export default (sequelize, DataTypes) => { | ||
const Holiday = sequelize.define('Holiday', { | ||
date: { | ||
type: DataTypes.DATE, | ||
allowNull: { | ||
args: false, | ||
msg: 'Please enter a date' | ||
} | ||
}, | ||
notes: DataTypes.STRING, | ||
from: { | ||
type: DataTypes.TIME, | ||
allowNull: { | ||
args: false, | ||
msg: 'Please enter start time' | ||
} | ||
}, | ||
to: { | ||
type: DataTypes.TIME, | ||
allowNull: { | ||
args: false, | ||
msg: 'Please enter end time' | ||
} | ||
}, | ||
}, {}); | ||
Holiday.associate = function (models) { | ||
// associations can be defined here | ||
}; | ||
return Holiday; | ||
}; | ||
const Holiday = sequelize.define( | ||
'Holiday', | ||
{ | ||
date: { | ||
type: DataTypes.DATE, | ||
allowNull: { | ||
args: false, | ||
msg: 'Please enter a date' | ||
} | ||
}, | ||
notes: DataTypes.STRING, | ||
from: DataTypes.TIME, | ||
to: DataTypes.TIME | ||
}, | ||
{} | ||
); | ||
Holiday.associate = function(models) { | ||
// associations can be defined here | ||
}; | ||
return Holiday; | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,31 @@ | ||
export default (sequelize, DataTypes) => { | ||
const WorkDay = sequelize.define('WorkDay', { | ||
user_id: { | ||
type: DataTypes.INTEGER, | ||
allowNull: { | ||
args: false, | ||
msg: 'Please enter user\'s name' | ||
} | ||
}, | ||
date: { | ||
type: DataTypes.DATE, | ||
allowNull: { | ||
args: false, | ||
msg: 'Please enter a date' | ||
} | ||
}, | ||
tags: DataTypes.STRING, | ||
notes: DataTypes.STRING, | ||
from: { | ||
type: DataTypes.TIME, | ||
allowNull: { | ||
args: false, | ||
msg: 'Please enter start time' | ||
} | ||
}, | ||
to: { | ||
type: DataTypes.TIME, | ||
allowNull: { | ||
args: false, | ||
msg: 'Please enter end time' | ||
} | ||
}, | ||
logged_hours: {type: DataTypes.DOUBLE} | ||
}, {}); | ||
WorkDay.associate = function (models) { | ||
// associations can be defined here | ||
}; | ||
return WorkDay; | ||
}; | ||
const WorkDay = sequelize.define( | ||
'WorkDay', | ||
{ | ||
user_id: { | ||
type: DataTypes.INTEGER, | ||
allowNull: { | ||
args: false, | ||
msg: "Please enter user's name" | ||
} | ||
}, | ||
date: { | ||
type: DataTypes.DATE, | ||
allowNull: { | ||
args: false, | ||
msg: 'Please enter a date' | ||
} | ||
}, | ||
tags: DataTypes.STRING, | ||
notes: DataTypes.STRING, | ||
from: DataTypes.TIME, | ||
to: DataTypes.TIME, | ||
logged_hours: {type: DataTypes.DOUBLE} | ||
}, | ||
{} | ||
); | ||
WorkDay.associate = function(models) { | ||
// associations can be defined here | ||
}; | ||
return WorkDay; | ||
}; |