"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class binaryAiEngineSnapshot extends sequelize_1.Model{static initModel(e){return binaryAiEngineSnapshot.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"}}},snapshotName:{type:sequelize_1.DataTypes.STRING(100),allowNull:!0},configData:{type:sequelize_1.DataTypes.JSON,allowNull:!1},tierData:{type:sequelize_1.DataTypes.JSON,allowNull:!0},reason:{type:sequelize_1.DataTypes.ENUM("AUTO","MANUAL","PRE_CHANGE"),allowNull:!1,defaultValue:"MANUAL"},createdBy:{type:sequelize_1.DataTypes.STRING(100),allowNull:!1,defaultValue:"SYSTEM"},notes:{type:sequelize_1.DataTypes.TEXT,allowNull:!0}},{sequelize:e,modelName:"binaryAiEngineSnapshot",tableName:"binary_ai_engine_snapshot",timestamps:!0,indexes:[{fields:["engineId"]},{fields:["createdAt"]},{fields:["reason"]}]})}static associate(e){binaryAiEngineSnapshot.belongsTo(e.binaryAiEngine,{foreignKey:"engineId",as:"engine",onDelete:"CASCADE"})}}exports.default=binaryAiEngineSnapshot;