UNPKG

@volare.finance/schemas.js

Version:
52 lines 2.6 kB
"use strict"; 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.PriceSchema = exports.Price = void 0; const mongoose_1 = require("@nestjs/mongoose"); const swagger_1 = require("@nestjs/swagger"); let Price = class Price { }; exports.Price = Price; __decorate([ (0, swagger_1.ApiProperty)({ description: `The timestamp at pair's price.`, example: 1649730130 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], Price.prototype, "timestamp", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: `The symbol.`, example: 'BTC' }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], Price.prototype, "symbol", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: `The pair name.`, example: 'BTCUSD' }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], Price.prototype, "pair", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: `The pair price.`, example: '39413.11000000' }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], Price.prototype, "price", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: `The pair price change percent (n per thousand).`, example: -6.15 }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", Number) ], Price.prototype, "changed", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'The source of price.', example: 'chainlink' }), (0, mongoose_1.Prop)({ index: true }), __metadata("design:type", String) ], Price.prototype, "source", void 0); exports.Price = Price = __decorate([ (0, mongoose_1.Schema)({ collection: 'price' }) ], Price); exports.PriceSchema = mongoose_1.SchemaFactory.createForClass(Price); //# sourceMappingURL=price.js.map