"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class binaryAiEngineSimulation extends sequelize_1.Model{static initModel(e){return binaryAiEngineSimulation.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"}}},startedAt:{type:sequelize_1.DataTypes.DATE,allowNull:!1},endedAt:{type:sequelize_1.DataTypes.DATE,allowNull:!0},status:{type:sequelize_1.DataTypes.ENUM("RUNNING","COMPLETED","CANCELLED"),allowNull:!1,defaultValue:"RUNNING"},ordersAnalyzed:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},simulatedWins:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},simulatedLosses:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},simulatedProfit:{type:sequelize_1.DataTypes.DECIMAL(18,8),allowNull:!1,defaultValue:0,get(){const e=this.getDataValue("simulatedProfit");return null!==e?parseFloat(e):0}},priceAdjustmentsWouldHaveMade:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},configUsed:{type:sequelize_1.DataTypes.JSON,allowNull:!0},summary:{type:sequelize_1.DataTypes.JSON,allowNull:!0}},{sequelize:e,modelName:"binaryAiEngineSimulation",tableName:"binary_ai_engine_simulation",timestamps:!0,indexes:[{fields:["engineId"]},{fields:["status"]},{fields:["startedAt"]}]})}static associate(e){binaryAiEngineSimulation.belongsTo(e.binaryAiEngine,{foreignKey:"engineId",as:"engine",onDelete:"CASCADE"})}}exports.default=binaryAiEngineSimulation;