/* jshint indent: 2 */

module.exports = function(sequelize:any, DataTypes:any) {
  return sequelize.define('match', {
    match_time: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    core_id: {
      type: DataTypes.BIGINT,
      allowNull: true
    },
    core_updateflag: {
      type: DataTypes.BIGINT,
      allowNull: true
    },
    info_id: {
      type: DataTypes.BIGINT,
      allowNull: true
    },
    info_updateflag: {
      type: DataTypes.BIGINT,
      allowNull: true
    },
    sportsdt_id: {
      type: DataTypes.BIGINT,
      allowNull: true
    },
    id: {
      type: DataTypes.INTEGER(11),
      allowNull: false,
      primaryKey: true,
      autoIncrement: true
    },
    createdAt: {
      type: DataTypes.DATE,
      allowNull: false,
      defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
    },
    updatedAt: {
      type: DataTypes.DATE,
      allowNull: false,
      defaultValue: sequelize.literal('CURRENT_TIMESTAMP')
    },
    valid_game: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    sportsdt_competition_id: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    competition_name: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    competition_short_name: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    competition_color: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    sportsdt_host_id: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    host_name: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    host_short_name: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    host_rank: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    host_photo: {
      type: DataTypes.STRING(500),
      allowNull: true
    },
    sportsdt_away_id: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    away_name: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    away_short_name: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    away_rank: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    away_photo: {
      type: DataTypes.STRING(500),
      allowNull: true
    },
    n: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    status: {
      type: DataTypes.INTEGER(11),
      allowNull: true
    },
    score: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    red_card: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    yellow_card: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    note: {
      type: DataTypes.STRING(500),
      allowNull: true
    },
    score_all: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    score_point: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    half: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    handicap: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    channel: {
      type: DataTypes.STRING(500),
      allowNull: true
    },
    weather: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    stadium: {
      type: DataTypes.STRING(500),
      allowNull: true
    },
    local_time: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    referee: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    spectator: {
      type: DataTypes.STRING(50),
      allowNull: true
    },
    core_body: {
      type: DataTypes.JSON,
      allowNull: true
    },
    info_body: {
      type: DataTypes.JSON,
      allowNull: true
    },
    sportsdt_body: {
      type: DataTypes.JSON,
      allowNull: true
    }
  }, {
    tableName: 'match'
  });
};