"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class binaryAiEngineDailyStats extends sequelize_1.Model{static initModel(e){return binaryAiEngineDailyStats.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"}}},date:{type:sequelize_1.DataTypes.DATEONLY,allowNull:!1},isDemo:{type:sequelize_1.DataTypes.BOOLEAN,allowNull:!1,defaultValue:!1},totalOrdersProcessed:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},totalWins:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},totalLosses:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},totalDraws:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},platformProfit:{type:sequelize_1.DataTypes.DECIMAL(18,8),allowNull:!1,defaultValue:0,get(){const e=this.getDataValue("platformProfit");return null!==e?parseFloat(e):0}},effectiveUserWinRate:{type:sequelize_1.DataTypes.DECIMAL(5,4),allowNull:!1,defaultValue:0,get(){const e=this.getDataValue("effectiveUserWinRate");return null!==e?parseFloat(e):0}},targetUserWinRate:{type:sequelize_1.DataTypes.DECIMAL(5,4),allowNull:!1,defaultValue:0,get(){const e=this.getDataValue("targetUserWinRate");return null!==e?parseFloat(e):0}},profitMargin:{type:sequelize_1.DataTypes.DECIMAL(5,4),allowNull:!1,defaultValue:0,get(){const e=this.getDataValue("profitMargin");return null!==e?parseFloat(e):0}},priceAdjustmentCount:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},avgAdjustmentPercent:{type:sequelize_1.DataTypes.DECIMAL(7,6),allowNull:!1,defaultValue:0,get(){const e=this.getDataValue("avgAdjustmentPercent");return null!==e?parseFloat(e):0}},largestAdjustmentPercent:{type:sequelize_1.DataTypes.DECIMAL(7,6),allowNull:!1,defaultValue:0,get(){const e=this.getDataValue("largestAdjustmentPercent");return null!==e?parseFloat(e):0}},whaleOrdersCount:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},cooldownsApplied:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,defaultValue:0},tierBreakdown:{type:sequelize_1.DataTypes.JSON,allowNull:!0}},{sequelize:e,modelName:"binaryAiEngineDailyStats",tableName:"binary_ai_engine_daily_stats",timestamps:!0,indexes:[{fields:["engineId","date","isDemo"],unique:!0},{fields:["date"]},{fields:["engineId"]}]})}static associate(e){binaryAiEngineDailyStats.belongsTo(e.binaryAiEngine,{foreignKey:"engineId",as:"engine",onDelete:"CASCADE"})}}exports.default=binaryAiEngineDailyStats;