"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class ecosystemPrivateLedger extends sequelize_1.Model{static initModel(e){return ecosystemPrivateLedger.init({id:{type:sequelize_1.DataTypes.UUID,defaultValue:sequelize_1.DataTypes.UUIDV4,primaryKey:!0,allowNull:!1},walletId:{type:sequelize_1.DataTypes.UUID,allowNull:!1,validate:{notNull:{msg:"walletId: Wallet ID cannot be null"},isUUID:{args:4,msg:"walletId: Wallet ID must be a valid UUID"}}},index:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,validate:{isInt:{msg:"index: Index must be an integer"}}},currency:{type:sequelize_1.DataTypes.STRING(50),allowNull:!1,validate:{notEmpty:{msg:"currency: Currency must not be empty"}}},chain:{type:sequelize_1.DataTypes.STRING(50),allowNull:!1,validate:{notEmpty:{msg:"chain: Chain must not be empty"}}},network:{type:sequelize_1.DataTypes.STRING(50),allowNull:!1,defaultValue:"mainnet",validate:{notEmpty:{msg:"network: Network must not be empty"}}},offchainDifference:{type:sequelize_1.DataTypes.DOUBLE,allowNull:!1,defaultValue:0,validate:{isNumeric:{msg:"offchainDifference: Offchain Difference must be a number"}}}},{sequelize:e,modelName:"ecosystemPrivateLedger",tableName:"ecosystem_private_ledger",timestamps:!0,paranoid:!0,indexes:[{name:"PRIMARY",unique:!0,using:"BTREE",fields:[{name:"id"}]},{name:"uniqueEcosystemPrivateLedger",unique:!0,using:"BTREE",fields:[{name:"walletId"},{name:"index"},{name:"currency"},{name:"chain"},{name:"network"}]}]})}static associate(e){ecosystemPrivateLedger.belongsTo(e.wallet,{as:"wallet",foreignKey:"walletId",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=ecosystemPrivateLedger;