const Sequelize = require("sequelize");
const sequelizeConnect = require("../connection/db");
const SellerAuditTrail = sequelizeConnect.define(
  "seller_audit_trail",
  {
    id: {
      type: Sequelize.BIGINT,
      primaryKey: true,
      allowNull: false,
      autoIncrement: true,
    },
    seller_id: {
      type: Sequelize.BIGINT,
      allowNull: false,
    },
    seller_company_id: {
      type: Sequelize.BIGINT,
      allowNull: false,
    },
    module: {
      type: Sequelize.STRING(500),
      allowNull: false,
    },
    action: {
      type: Sequelize.STRING(500),
      allowNull: true,
    },
    action_description: {
      type: Sequelize.TEXT,
      allowNull: true,
    },
  },
  {
    tableName: "seller_audit_trail",
    timestamps: true,
  }
);

module.exports = SellerAuditTrail;
