"use strict";Object.defineProperty(exports,"__esModule",{value:!0});const sequelize_1=require("sequelize");class ecosystemUtxo extends sequelize_1.Model{static initModel(e){return ecosystemUtxo.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"}}},transactionId:{type:sequelize_1.DataTypes.STRING(255),allowNull:!1,validate:{notEmpty:{msg:"transactionId: Transaction ID must not be empty"}}},index:{type:sequelize_1.DataTypes.INTEGER,allowNull:!1,validate:{isInt:{msg:"index: Index must be an integer"}}},amount:{type:sequelize_1.DataTypes.DOUBLE,allowNull:!1,validate:{isNumeric:{msg:"amount: Amount must be a number"}}},script:{type:sequelize_1.DataTypes.STRING(1e3),allowNull:!1,validate:{notEmpty:{msg:"script: Script must not be empty"}}},status:{type:sequelize_1.DataTypes.BOOLEAN,allowNull:!1,defaultValue:!1,validate:{isBoolean:{msg:"status: Status must be a boolean value"}}}},{sequelize:e,modelName:"ecosystemUtxo",tableName:"ecosystem_utxo",timestamps:!0,paranoid:!0,indexes:[{name:"PRIMARY",unique:!0,using:"BTREE",fields:[{name:"id"}]},{name:"ecosystemUtxoWalletIdIdx",using:"BTREE",fields:[{name:"walletId"}]}]})}static associate(e){ecosystemUtxo.belongsTo(e.wallet,{as:"wallet",foreignKey:"walletId",onDelete:"CASCADE",onUpdate:"CASCADE"})}}exports.default=ecosystemUtxo;