@volare.finance/schemas.js
Version:
70 lines • 3.77 kB
JavaScript
;
var __decorate = (this && this.__decorate) || function (decorators, target, key, desc) {
var c = arguments.length, r = c < 3 ? target : desc === null ? desc = Object.getOwnPropertyDescriptor(target, key) : desc, d;
if (typeof Reflect === "object" && typeof Reflect.decorate === "function") r = Reflect.decorate(decorators, target, key, desc);
else for (var i = decorators.length - 1; i >= 0; i--) if (d = decorators[i]) r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r;
return c > 3 && r && Object.defineProperty(target, key, r), r;
};
var __metadata = (this && this.__metadata) || function (k, v) {
if (typeof Reflect === "object" && typeof Reflect.metadata === "function") return Reflect.metadata(k, v);
};
Object.defineProperty(exports, "__esModule", { value: true });
exports.NftApprovalSchema = exports.NftApproval = void 0;
const mongoose_1 = require("@nestjs/mongoose");
const swagger_1 = require("@nestjs/swagger");
let NftApproval = class NftApproval {
};
exports.NftApproval = NftApproval;
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The timestamp at which the event is emitted.', example: 1643554235 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], NftApproval.prototype, "timestamp", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The block number in which the approval was emitted.', example: 15861587 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], NftApproval.prototype, "blockNumber", void 0);
__decorate([
(0, swagger_1.ApiProperty)({
description: 'The hash of the transaction which generates this approval.',
example: '0x93e9623362a57ee5368c09c29628855777e8c8065cc6b08b387bcd8b0a39ebce',
}),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], NftApproval.prototype, "transactionHash", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The log index in the transaction.', example: 276 }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", Number)
], NftApproval.prototype, "logIndex", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: 'The contract address which emits this approval.', example: '0x57e9a39ae8ec404c08f88740a9e6e306f50c937f' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], NftApproval.prototype, "contract", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: `The owner address.`, example: '0xd40bce9acd43f9541af7ec35b8a3fc3774a36b2c' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], NftApproval.prototype, "owner", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: `The operator address.`, example: '0x71381aa65eaa38e77bf14ae450da9f6202eb59fa' }),
(0, mongoose_1.Prop)({ index: true }),
__metadata("design:type", String)
], NftApproval.prototype, "operator", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: `The token id (Approval for all when tokenId is equal to 0).`, example: '628' }),
(0, mongoose_1.Prop)(),
__metadata("design:type", String)
], NftApproval.prototype, "tokenId", void 0);
__decorate([
(0, swagger_1.ApiProperty)({ description: `True if the operator is approved, false to revoke approval.`, example: true }),
(0, mongoose_1.Prop)(),
__metadata("design:type", Boolean)
], NftApproval.prototype, "approved", void 0);
exports.NftApproval = NftApproval = __decorate([
(0, mongoose_1.Schema)({ collection: 'nft_approval' })
], NftApproval);
exports.NftApprovalSchema = mongoose_1.SchemaFactory.createForClass(NftApproval);
//# sourceMappingURL=nft.approval.js.map