'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.createTable('MpesaPayments', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
       transactionPaymentId: {
        type: Sequelize.INTEGER
      },
      CheckoutRequestID: {
        type: Sequelize.STRING
      },
      MerchantRequestID: {
        type: Sequelize.STRING
      },
      PhoneNumber: {
        type: Sequelize.STRING
      },
      Amount: {
        type: Sequelize.DECIMAL
      },
      AccountReference: {
        type: Sequelize.STRING
      },
      TransactionDesc: {
        type: Sequelize.STRING
      },
      status: {
        type: Sequelize.STRING
      },
      MpesaReceiptNumber: {
        type: Sequelize.STRING
      },
      TransactionDate: {
        type: Sequelize.STRING
      },
      ResultDesc: {
        type: Sequelize.TEXT
      },
      orderId: {
        type: Sequelize.STRING
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  async down(queryInterface, Sequelize) {
    await queryInterface.dropTable('MpesaPayments');
  }
};