From 0f1fef88ca050a3160069594fcff7e19e1899676 Mon Sep 17 00:00:00 2001 From: schneefux Date: Thu, 4 May 2017 13:24:52 +0200 Subject: import teams --- models/tournament.js | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 models/tournament.js (limited to 'models/tournament.js') diff --git a/models/tournament.js b/models/tournament.js new file mode 100644 index 0000000..5722d02 --- /dev/null +++ b/models/tournament.js @@ -0,0 +1,41 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('tournament', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + status: { + type: DataTypes.ENUM('planned','active','finished'), + allowNull: false + }, + type: { + type: DataTypes.ENUM('players','team'), + allowNull: false + }, + start: { + type: DataTypes.TIME, + allowNull: true + }, + end: { + type: DataTypes.TIME, + allowNull: true + } + }, { + tableName: 'tournament', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; -- cgit v1.3.1