competition_rule.ts 810 字节
module.exports = function (sequelize: any, DataTypes: any) {
  return sequelize.define('competition_rule', {
    id: {
      autoIncrement: true,
      type: DataTypes.INTEGER,
      allowNull: false,
      primaryKey: true,
      comment: "赛制ID"
    },
    competition_id: {
      type: DataTypes.INTEGER,
      allowNull: false,
      comment: "赛事ID"
    },
    season_ids: {
      type: DataTypes.JSON,
      allowNull: true,
      comment: "赛季ID列表"
    },
    text: {
      type: DataTypes.TEXT,
      allowNull: true,
      comment: "赛制说明"
    },
    updated_at: {
      type: DataTypes.BIGINT,
      allowNull: true,
      get(){
        return moment(this.getDataValue('updated_at')).format('YYYY-MM-DD HH:mm:ss');
      }
    }
  }, {
    tableName: 'competition_rule'
  });
};