UNPKG

won-dto

Version:

Won DTO For WonCore

25 lines 1.18 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.NetworkContractHook = exports.networkContractSchema = void 0; const mongoose_1 = require("mongoose"); const baseModel_1 = require("../base/baseModel"); const networkContract_enum_1 = require("./networkContract.enum"); const network_enum_1 = require("../network/network.enum"); exports.networkContractSchema = new mongoose_1.Schema({ name: { type: String }, code: { type: String }, contractAddress: { type: String }, contractABI: { type: String }, providerUrl: { type: String }, wssProviderUrl: { type: String }, chainCode: { type: String, enum: network_enum_1.ChainCodes }, networkId: { type: mongoose_1.Schema.Types.ObjectId, ref: "Network" }, status: { type: String, enum: networkContract_enum_1.NetworkContractStatus, default: networkContract_enum_1.NetworkContractStatus.ACTIVED }, }, { timestamps: true }); // networkContractSchema.index({ name: "text" }, { weights: { name: 2 } }); exports.NetworkContractHook = new baseModel_1.ModelHook(exports.networkContractSchema); //# sourceMappingURL=networkContract.schema.js.map