summaryrefslogtreecommitdiff
path: root/models/item_participant.js
blob: 0a5f866ee93db80dee9dd3a51433af290ae54ea1 (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
30
31
32
33
/* jshint indent: 2 */

module.exports = function(sequelize, DataTypes) {
  return sequelize.define('item_participant', {
    id: {
      type: DataTypes.INTEGER(10).UNSIGNED,
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    participant_stats_id: {
      type: DataTypes.CHAR(36),
      allowNull: false
    },
    item_id: {
      type: DataTypes.STRING(191),
      allowNull: false
    },
    action: {
      type: DataTypes.ENUM('grant','sell','use','final'),
      allowNull: false
    },
    time_from_start: {
      type: DataTypes.INTEGER(5).UNSIGNED,
      allowNull: true
    }
  }, {
    tableName: 'item_participant',
    timestamps: false,
    underscored: true,
    freezeTableName: true
  });
};