'use strict';
module.exports = {
  up: (queryInterface, Sequelize) => {
    return queryInterface.createTable('TeamInvites', {
      id: {
        type: Sequelize.BIGINT,
        primaryKey: true,
        autoIncrement: true
      },
      TeamId: {
        type: Sequelize.BIGINT,
        allowNull: false
      },
      RoleId: {
        type: Sequelize.BIGINT,
        allowNull: false
      },
      UserId: {
        type: Sequelize.BIGINT,
        allowNull: false
      },
      uses: {
        type: Sequelize.BIGINT,
        default: 0,
        defaultValue: 0
      },
      maxUses: {
        type: Sequelize.BIGINT,
        default: 0,
        defaultValue: 0
      }
    });
  },
  down: (queryInterface, Sequelize) => {
    return queryInterface.dropTable('TeamInvites');
  }
};
