"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class binaryAiEngineAction extends sequelize_1.Model{static initModel(e){return binaryAiEngineAction.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},engineId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,validate:{notEmpty:{msg:"engineId: Engine ID must not be empty"},isUUID:{args:4,msg:"engineId: Must be a valid UUID"}}},actionType:{type:sequelize_1.DataTypes.ENUM("PRICE_ADJUSTMENT","OUTCOME_OVERRIDE","PERIOD_RESET","CONFIG_CHANGE","ENGINE_START","ENGINE_STOP","ENGINE_PAUSE","EMERGENCY_STOP","MANUAL_OVERRIDE","TIER_ADJUSTMENT","COOLDOWN_APPLIED","COOLDOWN_REMOVED","WHALE_DETECTED","WHALE_HANDLED","SIMULATION_RUN","ROLLBACK_EXECUTED","CORRELATION_ALERT","AB_TEST_STARTED","AB_TEST_ENDED"),allowNull:!1},symbol:{type:sequelize_1.DataTypes.STRING(20),allowNull:!0},details:{type:sequelize_1.DataTypes.JSON,allowNull:!0},previousValue:{type:sequelize_1.DataTypes.JSON,allowNull:!0},newValue:{type:sequelize_1.DataTypes.JSON,allowNull:!0},triggeredBy:{type:sequelize_1.DataTypes.STRING(100),allowNull:!1,defaultValue:"SYSTEM"},isDemo:{type:sequelize_1.DataTypes.BOOLEAN,allowNull:!1,defaultValue:!1},isSimulated:{type:sequelize_1.DataTypes.BOOLEAN,allowNull:!1,defaultValue:!1},affectedUserId:{type:sequelize_1.DataTypes.UUID,allowNull:!0}},{sequelize:e,modelName:"binaryAiEngineAction",tableName:"binary_ai_engine_action",timestamps:!0,indexes:[{fields:["engineId"]},{fields:["actionType"]},{fields:["createdAt"]},{fields:["isSimulated"]},{fields:["affectedUserId"]},{fields:["isDemo"]}]})}static associate(e){binaryAiEngineAction.belongsTo(e.binaryAiEngine,{foreignKey:"engineId",as:"engine",onDelete:"CASCADE"})}}exports.default=binaryAiEngineAction;