text: 'use strict';
  
  module.exports = {
    up: (queryInterface, Sequelize) => {
      return queryInterface.createTable('Coupons', {
        id: {
          allowNull: false,
          autoIncrement: true,
          primaryKey: true,
          type: Sequelize.INTEGER
        },
        code: {
          type: Sequelize.STRING
        },
        amount: {
          type: Sequelize.DECIMAL
        },
        expires: {
          type: Sequelize.BOOLEAN
        },
        validUntil: {
          type: Sequelize.DATE
        },
        times: {
          type: Sequelize.INTEGER
        },
        createdAt: {
          allowNull: false,
          type: Sequelize.DATE,
          defaultValue: Sequelize.fn('NOW')
        },
        updatedAt: {
          allowNull: true,
          type: Sequelize.DATE
        }
      });
    },
  
    down: (queryInterface, Sequelize) => {
      return queryInterface.dropTable('Coupons');
    }
  };
  