"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class exchangeWatchlist extends sequelize_1.Model{static initModel(e){return exchangeWatchlist.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},userId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,validate:{notNull:{msg:"userId: User ID cannot be null"},isUUID:{args:4,msg:"userId: User ID must be a valid UUID"}},comment:"ID of the user who added this symbol to watchlist"},symbol:{type:sequelize_1.DataTypes.STRING(191),allowNull:!1,validate:{notEmpty:{msg:"symbol: Symbol must not be empty"}},comment:"Trading symbol/pair being watched"}},{sequelize:e,modelName:"exchangeWatchlist",tableName:"exchange_watchlist",timestamps:!1,indexes:[{name:"PRIMARY",unique:!0,using:"BTREE",fields:[{name:"id"}]},{name:"exchangeWatchlistUserIdForeign",using:"BTREE",fields:[{name:"userId"}]}]})}static associate(e){exchangeWatchlist.belongsTo(e.user,{as:"user",foreignKey:"userId",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=exchangeWatchlist;