"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class binaryAiEngineCorrelationAlert extends sequelize_1.Model{static initModel(e){return binaryAiEngineCorrelationAlert.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"}}},symbol:{type:sequelize_1.DataTypes.STRING(20),allowNull:!1,validate:{notEmpty:{msg:"symbol: Symbol must not be empty"}}},internalPrice:{type:sequelize_1.DataTypes.DECIMAL(18,8),allowNull:!1,get(){const e=this.getDataValue("internalPrice");return null!==e?parseFloat(e):0}},externalPrice:{type:sequelize_1.DataTypes.DECIMAL(18,8),allowNull:!1,get(){const e=this.getDataValue("externalPrice");return null!==e?parseFloat(e):0}},deviationPercent:{type:sequelize_1.DataTypes.DECIMAL(7,6),allowNull:!1,get(){const e=this.getDataValue("deviationPercent");return null!==e?parseFloat(e):0}},priceSource:{type:sequelize_1.DataTypes.STRING(50),allowNull:!1},severity:{type:sequelize_1.DataTypes.ENUM("LOW","MEDIUM","HIGH","CRITICAL"),allowNull:!1,defaultValue:"MEDIUM"},status:{type:sequelize_1.DataTypes.ENUM("ACTIVE","ACKNOWLEDGED","RESOLVED"),allowNull:!1,defaultValue:"ACTIVE"},acknowledgedBy:{type:sequelize_1.DataTypes.STRING(100),allowNull:!0},acknowledgedAt:{type:sequelize_1.DataTypes.DATE,allowNull:!0},resolvedAt:{type:sequelize_1.DataTypes.DATE,allowNull:!0}},{sequelize:e,modelName:"binaryAiEngineCorrelationAlert",tableName:"binary_ai_engine_correlation_alert",timestamps:!0,indexes:[{fields:["engineId"]},{fields:["status"]},{fields:["severity"]},{fields:["createdAt"]},{fields:["symbol"]}]})}static associate(e){binaryAiEngineCorrelationAlert.belongsTo(e.binaryAiEngine,{foreignKey:"engineId",as:"engine",onDelete:"CASCADE"})}}exports.default=binaryAiEngineCorrelationAlert;