summaryrefslogtreecommitdiff
path: root/models/tournament_participants.js
blob: 010a89ebb442781f72f89ee1706316bd9d53c3a3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* jshint indent: 2 */

module.exports = function(sequelize, DataTypes) {
  return sequelize.define('tournament_participants', {
    id: {
      type: DataTypes.INTEGER(10).UNSIGNED,
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    tournament_id: {
      type: DataTypes.BIGINT,
      allowNull: false
    },
    tournament_team_id: {
      type: DataTypes.BIGINT,
      allowNull: false
    },
    player_api_id: {
      type: DataTypes.CHAR(36),
      allowNull: false
    }
  }, {
    tableName: 'tournament_participants',
    timestamps: false,
    underscored: true,
    freezeTableName: true
  });
};