"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class copyTradingAuditLog extends sequelize_1.Model{static initModel(e){return copyTradingAuditLog.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},entityType:{type:sequelize_1.DataTypes.STRING(100),allowNull:!1},entityId:{type:sequelize_1.DataTypes.UUID,allowNull:!1},action:{type:sequelize_1.DataTypes.STRING(100),allowNull:!1},oldValue:{type:sequelize_1.DataTypes.TEXT,allowNull:!0},newValue:{type:sequelize_1.DataTypes.TEXT,allowNull:!0},userId:{type:sequelize_1.DataTypes.UUID,allowNull:!0},adminId:{type:sequelize_1.DataTypes.UUID,allowNull:!0},ipAddress:{type:sequelize_1.DataTypes.STRING(45),allowNull:!0},userAgent:{type:sequelize_1.DataTypes.STRING(500),allowNull:!0},reason:{type:sequelize_1.DataTypes.TEXT,allowNull:!0},metadata:{type:sequelize_1.DataTypes.TEXT,allowNull:!0},createdAt:{type:sequelize_1.DataTypes.DATE,allowNull:!1,defaultValue:sequelize_1.DataTypes.NOW}},{sequelize:e,modelName:"copyTradingAuditLog",tableName:"copy_trading_audit_logs",timestamps:!1,indexes:[{name:"PRIMARY",unique:!0,fields:[{name:"id"}]},{name:"copy_trading_audit_logs_entity_idx",fields:[{name:"entityType"},{name:"entityId"}]},{name:"copy_trading_audit_logs_action_idx",fields:[{name:"action"}]},{name:"copy_trading_audit_logs_user_id_idx",fields:[{name:"userId"}]},{name:"copy_trading_audit_logs_admin_id_idx",fields:[{name:"adminId"}]},{name:"copy_trading_audit_logs_created_at_idx",fields:[{name:"createdAt"}]}]})}static associate(e){copyTradingAuditLog.belongsTo(e.user,{foreignKey:"userId",as:"user",onDelete:"SET NULL",onUpdate:"CASCADE"});copyTradingAuditLog.belongsTo(e.user,{foreignKey:"adminId",as:"admin",onDelete:"SET NULL",onUpdate:"CASCADE"})}}exports.default=copyTradingAuditLog;