text: 'use strict';
  const { UUIDV4 } = require("sequelize");
  
  module.exports = {
    up: async (queryInterface, Sequelize) => {
      await queryInterface.createTable("Credits", {
        id: {
          allowNull: false,
          primaryKey: true,
          type: Sequelize.UUID,
          defaultValue: UUIDV4
        },
        userId: {
          type: Sequelize.UUID,
          allowNull: false,
        },
        amount: {
          type: Sequelize.INTEGER,
          allowNull: false,
        },
        transactionType: {
          type: Sequelize.ENUM("Transfer", "Deposit"),
          defaultValue: "Deposit",
        },
        senderName: {
          type: Sequelize.STRING,
          allowNull: false,
        },
        createdAt: {
          allowNull: false,
          type: Sequelize.DATE
        },
        updatedAt: {
          allowNull: false,
          type: Sequelize.DATE
        }
      });
    },
    down: async (queryInterface, Sequelize) => {
      await queryInterface.dropTable('Credits');
    }
  };