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/team.js | |
| parent | 7802d6bf0d1273fe2e4ba1e6fbd889d733413041 (diff) | |
| download | orm-0f1fef88ca050a3160069594fcff7e19e1899676.tar.gz orm-0f1fef88ca050a3160069594fcff7e19e1899676.zip | |
import teams
Diffstat (limited to 'models/team.js')
| -rw-r--r-- | models/team.js | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/models/team.js b/models/team.js new file mode 100644 index 0000000..c9a7880 --- /dev/null +++ b/models/team.js @@ -0,0 +1,50 @@ +/* jshint indent: 2 */ + +module.exports = function(sequelize, DataTypes) { + return sequelize.define('team', { + id: { + type: DataTypes.INTEGER(10).UNSIGNED, + allowNull: false, + primaryKey: true, + autoIncrement: true + }, + shard_id: { + type: DataTypes.STRING(5), + allowNull: true + }, + api_id: { + type: DataTypes.CHAR(36), + allowNull: true + }, + created_at: { + type: DataTypes.TIME, + allowNull: false, + defaultValue: sequelize.literal('CURRENT_TIMESTAMP') + }, + tournament_id: { + type: DataTypes.BIGINT, + allowNull: true + }, + name: { + type: DataTypes.STRING(20), + allowNull: false + }, + identifier: { + type: DataTypes.STRING(10), + allowNull: false + }, + status: { + type: DataTypes.ENUM('planned','active','inactive'), + allowNull: false + }, + type: { + type: DataTypes.ENUM('team','guild','tournament'), + allowNull: false + } + }, { + tableName: 'team', + timestamps: false, + underscored: true, + freezeTableName: true + }); +}; |
