diff options
| author | schneefux <schneefux+commit@schneefux.xyz> | 2017-06-08 12:42:19 +0200 |
|---|---|---|
| committer | schneefux <schneefux+commit@schneefux.xyz> | 2017-06-08 12:42:19 +0200 |
| commit | c5cd9e53d7413ce960a2170eedb466073175bf80 (patch) | |
| tree | c68eaf276b864e710645a8b1d8ca5e4c3de90271 /models/stage.js | |
| parent | e263eecd3951de72a67d00c26c95e9752179a39c (diff) | |
| download | orm-c5cd9e53d7413ce960a2170eedb466073175bf80.tar.gz orm-c5cd9e53d7413ce960a2170eedb466073175bf80.zip | |
import 2.7.0 table changes
Diffstat (limited to 'models/stage.js')
| -rw-r--r-- | models/stage.js | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/models/stage.js b/models/stage.js new file mode 100644 index 0000000..222c130 --- /dev/null +++ b/models/stage.js @@ -0,0 +1,45 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('stage', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + api_id: { + type: DataTypes.STRING(191), + allowNull: true + }, + season_id: { + type: DataTypes.INTEGER(11), + allowNull: false + }, + name: { + type: DataTypes.STRING(191), + allowNull: false + }, + start: { + type: DataTypes.TIME, + allowNull: true + }, + end: { + type: DataTypes.TIME, + allowNull: true + }, + type: { + type: DataTypes.ENUM('group','league','swiss','single_elimination','double_elimination','bracket'), + allowNull: false + }, + status: { + type: DataTypes.ENUM('planned','active','finished'), + allowNull: false + } + }, { + tableName: 'stage', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; |
