'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up(queryInterface, Sequelize) {
    await queryInterface.createTable('DailySales', {
      id: {
        allowNull: false,
        autoIncrement: true,
        primaryKey: true,
        type: Sequelize.INTEGER
      },
      storeId: {
        type: Sequelize.INTEGER
      },
      registerId: {
        type: Sequelize.INTEGER
      },
      salesDate: {
        type: Sequelize.DATE
      },
      totalTransactions: {
        type: Sequelize.INTEGER
      },
      totalItems: {
        type: Sequelize.INTEGER
      },
      grossSales: {
        type: Sequelize.DECIMAL
      },
      discounts: {
        type: Sequelize.DECIMAL
      },
      taxes: {
        type: Sequelize.DECIMAL
      },
      netSales: {
        type: Sequelize.DECIMAL
      },
      refunds: {
        type: Sequelize.DECIMAL
      },
      cashSales: {
        type: Sequelize.DECIMAL
      },
      cardSales: {
        type: Sequelize.DECIMAL
      },
      mobilePayments: {
        type: Sequelize.DECIMAL
      },
      createdAt: {
        allowNull: false,
        type: Sequelize.DATE
      },
      updatedAt: {
        allowNull: false,
        type: Sequelize.DATE
      }
    });
  },
  async down(queryInterface, Sequelize) {
    await queryInterface.dropTable('DailySales');
  }
};