diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-04 13:24:52 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-05-04 13:24:52 +0200 |
| commit | 0f1fef88ca050a3160069594fcff7e19e1899676 (patch) | |
| tree | c5a6e8ac868aadad88698cdd409caa8a03be7d5a /models/tournament.js | |
| parent | 7802d6bf0d1273fe2e4ba1e6fbd889d733413041 (diff) | |
| download | orm-0f1fef88ca050a3160069594fcff7e19e1899676.tar.gz orm-0f1fef88ca050a3160069594fcff7e19e1899676.zip | |
import teams
Diffstat (limited to 'models/tournament.js')
| -rw-r--r-- | models/tournament.js | 41 |
1 files changed, 41 insertions, 0 deletions
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 + }); +}; |
