summaryrefslogtreecommitdiff
path: root/models/event.js
diff options
context:
space:
mode:
authorschneefux <schneefux+commit@schneefux.xyz>2017-06-08 12:42:19 +0200
committerschneefux <schneefux+commit@schneefux.xyz>2017-06-08 12:42:19 +0200
commitc5cd9e53d7413ce960a2170eedb466073175bf80 (patch)
treec68eaf276b864e710645a8b1d8ca5e4c3de90271 /models/event.js
parente263eecd3951de72a67d00c26c95e9752179a39c (diff)
downloadorm-c5cd9e53d7413ce960a2170eedb466073175bf80.tar.gz
orm-c5cd9e53d7413ce960a2170eedb466073175bf80.zip
import 2.7.0 table changes
Diffstat (limited to 'models/event.js')
-rw-r--r--models/event.js57
1 files changed, 57 insertions, 0 deletions
diff --git a/models/event.js b/models/event.js
new file mode 100644
index 0000000..beed589
--- /dev/null
+++ b/models/event.js
@@ -0,0 +1,57 @@
+/* jshint indent: 2 */
+
+module.exports = function(sequelize, DataTypes) {
+ return sequelize.define('event', {
+ id: {
+ type: DataTypes.INTEGER(10).UNSIGNED,
+ allowNull: false,
+ primaryKey: true,
+ autoIncrement: true
+ },
+ api_id: {
+ type: DataTypes.STRING(191),
+ allowNull: true
+ },
+ group_id: {
+ type: DataTypes.INTEGER(11),
+ allowNull: false
+ },
+ name: {
+ type: DataTypes.STRING(191),
+ allowNull: false
+ },
+ team_1_id: {
+ type: DataTypes.INTEGER(11),
+ allowNull: false
+ },
+ team_1_score: {
+ type: DataTypes.INTEGER(11),
+ allowNull: true
+ },
+ team_2_id: {
+ type: DataTypes.INTEGER(11),
+ allowNull: false
+ },
+ team_2_score: {
+ type: DataTypes.INTEGER(11),
+ allowNull: true
+ },
+ date: {
+ type: DataTypes.TIME,
+ allowNull: true
+ },
+ bestOf: {
+ type: DataTypes.ENUM('1','3','5','7','9'),
+ allowNull: true
+ },
+ winner_id: {
+ type: DataTypes.INTEGER(11),
+ allowNull: true
+ }
+ }, {
+ tableName: 'event',
+ timestamps: false,
+ underscored: true,
+ freezeTableName: true
+ });
+};