"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class ecommerceWishlistItem extends sequelize_1.Model{static initModel(e){return ecommerceWishlistItem.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},wishlistId:{type:sequelize_1.DataTypes.UUID,allowNull:!1},productId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,validate:{isUUID:{args:4,msg:"productId: Product ID must be a valid UUID"}}}},{sequelize:e,modelName:"ecommerceWishlistItem",tableName:"ecommerce_wishlist_item",timestamps:!0,paranoid:!0,indexes:[{name:"PRIMARY",unique:!0,using:"BTREE",fields:[{name:"id"}]},{name:"ecommerceWishlistItemWishlistIdProductId",unique:!0,using:"BTREE",fields:[{name:"wishlistId"},{name:"productId"}]}]})}static associate(e){ecommerceWishlistItem.belongsTo(e.ecommerceWishlist,{as:"wishlist",foreignKey:"wishlistId",onDelete:"CASCADE",onUpdate:"CASCADE"});ecommerceWishlistItem.belongsTo(e.ecommerceProduct,{as:"product",foreignKey:"productId",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=ecommerceWishlistItem;