UNPKG

@takentrade/takentrade-libs

Version:
69 lines (68 loc) 2.43 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; }; Object.defineProperty(exports, "__esModule", { value: true }); exports.AccountDTO = void 0; const class_validator_1 = require("class-validator"); const class_transformer_1 = require("class-transformer"); /** * Account Data Transfer Object * Matches Prisma Account model schema */ class AccountDTO { id; availableBalance; bookBalance; referralBalance; pendingReferralBalance; cashbackBalance; isPinSet; userId; hasRestrictions; holdAmount; createdAt; updatedAt; } exports.AccountDTO = AccountDTO; __decorate([ (0, class_validator_1.IsString)() ], AccountDTO.prototype, "id", void 0); __decorate([ (0, class_validator_1.IsNumber)() ], AccountDTO.prototype, "availableBalance", void 0); __decorate([ (0, class_validator_1.IsNumber)() ], AccountDTO.prototype, "bookBalance", void 0); __decorate([ (0, class_validator_1.IsNumber)() ], AccountDTO.prototype, "referralBalance", void 0); __decorate([ (0, class_validator_1.IsNumber)() ], AccountDTO.prototype, "pendingReferralBalance", void 0); __decorate([ (0, class_validator_1.IsNumber)() ], AccountDTO.prototype, "cashbackBalance", void 0); __decorate([ (0, class_validator_1.IsBoolean)() ], AccountDTO.prototype, "isPinSet", void 0); __decorate([ (0, class_validator_1.IsString)() ], AccountDTO.prototype, "userId", void 0); __decorate([ (0, class_validator_1.IsBoolean)() ], AccountDTO.prototype, "hasRestrictions", void 0); __decorate([ (0, class_validator_1.IsNumber)() ], AccountDTO.prototype, "holdAmount", void 0); __decorate([ (0, class_transformer_1.Type)(() => Date), (0, class_validator_1.IsDate)() ], AccountDTO.prototype, "createdAt", void 0); __decorate([ (0, class_transformer_1.Type)(() => Date), (0, class_validator_1.IsDate)() ], AccountDTO.prototype, "updatedAt", void 0);