"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class copyTradingFollowerAllocation extends sequelize_1.Model{static initModel(e){return copyTradingFollowerAllocation.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},followerId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,validate:{notNull:{msg:"followerId: Follower ID is required"}}},symbol:{type:sequelize_1.DataTypes.STRING(20),allowNull:!1},baseAmount:{type:sequelize_1.DataTypes.FLOAT,allowNull:!1,defaultValue:0,validate:{min:{args:[0],msg:"baseAmount: Cannot be negative"}}},baseUsedAmount:{type:sequelize_1.DataTypes.FLOAT,allowNull:!1,defaultValue:0},quoteAmount:{type:sequelize_1.DataTypes.FLOAT,allowNull:!1,defaultValue:0,validate:{min:{args:[0],msg:"quoteAmount: Cannot be negative"}}},quoteUsedAmount:{type:sequelize_1.DataTypes.FLOAT,allowNull:!1,defaultValue:0},isActive:{type:sequelize_1.DataTypes.BOOLEAN,allowNull:!1,defaultValue:!0},createdAt:{type:sequelize_1.DataTypes.DATE,allowNull:!1,defaultValue:sequelize_1.DataTypes.NOW},updatedAt:{type:sequelize_1.DataTypes.DATE,allowNull:!1,defaultValue:sequelize_1.DataTypes.NOW}},{sequelize:e,modelName:"copyTradingFollowerAllocation",tableName:"copy_trading_follower_allocations",timestamps:!0,indexes:[{name:"PRIMARY",unique:!0,fields:[{name:"id"}]},{name:"copy_trading_follower_alloc_unique",unique:!0,fields:[{name:"followerId"},{name:"symbol"}]},{name:"copy_trading_follower_alloc_follower_idx",fields:[{name:"followerId"}]},{name:"copy_trading_follower_alloc_symbol_idx",fields:[{name:"symbol"}]}]})}static associate(e){copyTradingFollowerAllocation.belongsTo(e.copyTradingFollower,{foreignKey:"followerId",as:"follower",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=copyTradingFollowerAllocation;