UNPKG

@goboomtown/entities-nest

Version:

entities in typescript format. This includes: - CustomerDTO, CustomerLocationDTO, CasesDTO

162 lines 6.1 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.CustomerContactDTO = void 0; exports.customerContactFields = customerContactFields; var swagger_1 = require("@nestjs/swagger"); var class_validator_1 = require("class-validator"); var translate_1 = require("../helper/translate"); var CustomerContactDTO = (function () { function CustomerContactDTO() { this.customerId = ''; this.firstName = ''; this.lastName = ''; this.email = ''; } __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", String) ], CustomerContactDTO.prototype, "id", void 0); __decorate([ (0, swagger_1.ApiProperty)({ required: true, description: 'Customer Id' }), (0, class_validator_1.IsNotEmpty)(), __metadata("design:type", String) ], CustomerContactDTO.prototype, "customerId", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", String) ], CustomerContactDTO.prototype, "customerLocationId", void 0); __decorate([ (0, swagger_1.ApiProperty)({ required: false, description: 'First Name' }), __metadata("design:type", String) ], CustomerContactDTO.prototype, "firstName", void 0); __decorate([ (0, swagger_1.ApiProperty)({ required: false, description: 'Last Name' }), __metadata("design:type", String) ], CustomerContactDTO.prototype, "lastName", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", String) ], CustomerContactDTO.prototype, "fullName", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", String) ], CustomerContactDTO.prototype, "email", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", String) ], CustomerContactDTO.prototype, "smsNumber", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", String) ], CustomerContactDTO.prototype, "externalId", void 0); __decorate([ (0, swagger_1.ApiProperty)(), __metadata("design:type", String) ], CustomerContactDTO.prototype, "lang", void 0); return CustomerContactDTO; }()); exports.CustomerContactDTO = CustomerContactDTO; function customerContactFields(lang) { var model = (0, translate_1.translate)(lang); var fields = [ { index: 1, name: 'firstName', label: model.customerContact.label.firstName, description: model.customerContact.description.firstName, isRequired: false, dataType: 'string', display: true, isCustomField: false, isDependent: false, }, { index: 2, name: 'lastName', label: model.customerContact.label.lastName, description: model.customerContact.description.lastName, isRequired: false, dataType: 'string', display: true, isCustomField: false, isDependent: false, }, { index: 3, name: 'fullName', label: model.customerContact.label.fullName, description: model.customerContact.description.fullName, isRequired: false, dataType: 'string', display: true, isCustomField: false, isDependent: false, }, { index: 4, name: 'email', label: model.customerContact.label.email, description: model.customerContact.description.email, isRequired: false, dataType: 'string', display: true, isCustomField: false, isDependent: false, }, { index: 5, name: 'externalId', label: model.customerContact.label.externalId, description: model.customerContact.description.externalId, isRequired: false, dataType: 'string', display: true, isCustomField: false, isDependent: false, }, { index: 6, name: 'lang', label: model.customerContact.label.lang, description: model.customerContact.description.lang, isRequired: false, dataType: 'string', display: true, isCustomField: false, isDependent: false, }, { index: 7, name: 'smsNumber', label: model.customerContact.label.smsNumber, description: model.customerContact.description.smsNumber, isRequired: false, dataType: 'string', display: true, isCustomField: false, isDependent: false, }, { index: 8, name: 'customerId', label: model.customerContact.label.customerId, description: model.customerContact.description.customerId, isRequired: true, dataType: 'string', display: true, isCustomField: false, isDependent: true, }, ]; return fields; } //# sourceMappingURL=customer-contact-dto.js.map