"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class mlmReferralReward extends sequelize_1.Model{static initModel(e){return mlmReferralReward.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},conditionId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,validate:{isUUID:{args:4,msg:"conditionId: Condition ID must be a valid UUID"}}},referrerId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,validate:{isUUID:{args:4,msg:"referrerId: Referrer ID must be a valid UUID"}}},reward:{type:sequelize_1.DataTypes.DOUBLE,allowNull:!1,validate:{isFloat:{msg:"reward: Reward must be a valid number"}}},isClaimed:{type:sequelize_1.DataTypes.BOOLEAN,allowNull:!1,defaultValue:!1}},{sequelize:e,modelName:"mlmReferralReward",tableName:"mlm_referral_reward",timestamps:!0,paranoid:!0,indexes:[{name:"PRIMARY",unique:!0,using:"BTREE",fields:[{name:"id"}]},{name:"mlmReferralRewardConditionIdFkey",using:"BTREE",fields:[{name:"conditionId"}]},{name:"mlmReferralRewardReferrerIdFkey",using:"BTREE",fields:[{name:"referrerId"}]}]})}static associate(e){mlmReferralReward.belongsTo(e.mlmReferralCondition,{as:"condition",foreignKey:"conditionId",onDelete:"CASCADE",onUpdate:"CASCADE"});mlmReferralReward.belongsTo(e.user,{as:"referrer",foreignKey:"referrerId",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=mlmReferralReward;