"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class investmentPlanDuration extends sequelize_1.Model{static initModel(e){return investmentPlanDuration.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1,comment:"Unique identifier for the plan-duration relationship"},planId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,comment:"ID of the investment plan"},durationId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,comment:"ID of the duration option available for this plan"}},{sequelize:e,modelName:"investmentPlanDuration",tableName:"investment_plan_duration",timestamps:!1,indexes:[{name:"PRIMARY",unique:!0,using:"BTREE",fields:[{name:"id"}]},{name:"idxPlanId",using:"BTREE",fields:[{name:"planId"}]},{name:"idxDurationId",using:"BTREE",fields:[{name:"durationId"}]}]})}static associate(e){investmentPlanDuration.belongsTo(e.investmentDuration,{as:"duration",foreignKey:"durationId",onDelete:"CASCADE",onUpdate:"CASCADE"});investmentPlanDuration.belongsTo(e.investmentPlan,{as:"plan",foreignKey:"planId",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=investmentPlanDuration;