UNPKG

@mbc-cqrs-serverless/ui-setting

Version:
97 lines 4.67 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.SettingAttributes = exports.SettingAttrFields = void 0; const openapi = require("@nestjs/swagger"); const class_transformer_1 = require("class-transformer"); const class_validator_1 = require("class-validator"); class SettingAttrFields { constructor(attrs) { Object.assign(this, attrs); } static _OPENAPI_METADATA_FACTORY() { return { physicalName: { required: true, type: () => String }, name: { required: true, type: () => String }, description: { required: false, type: () => String }, dataType: { required: true, type: () => String }, min: { required: false, type: () => String }, max: { required: false, type: () => String }, length: { required: false, type: () => String }, maxRow: { required: false, type: () => Number, minimum: 1 }, defaultValue: { required: false, type: () => String }, isRequired: { required: true, type: () => Boolean }, isShowedOnList: { required: true, type: () => Boolean }, dataFormat: { required: false, type: () => String } }; } } exports.SettingAttrFields = SettingAttrFields; __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], SettingAttrFields.prototype, "physicalName", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], SettingAttrFields.prototype, "name", void 0); __decorate([ (0, class_validator_1.IsString)(), (0, class_validator_1.IsOptional)(), __metadata("design:type", String) ], SettingAttrFields.prototype, "description", void 0); __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], SettingAttrFields.prototype, "dataType", void 0); __decorate([ (0, class_validator_1.IsString)(), (0, class_validator_1.IsOptional)(), __metadata("design:type", String) ], SettingAttrFields.prototype, "min", void 0); __decorate([ (0, class_validator_1.IsString)(), (0, class_validator_1.IsOptional)(), __metadata("design:type", String) ], SettingAttrFields.prototype, "max", void 0); __decorate([ (0, class_validator_1.IsString)(), (0, class_validator_1.IsOptional)(), __metadata("design:type", String) ], SettingAttrFields.prototype, "length", void 0); __decorate([ (0, class_validator_1.IsNumber)(), (0, class_validator_1.Min)(1), (0, class_validator_1.IsOptional)(), __metadata("design:type", Number) ], SettingAttrFields.prototype, "maxRow", void 0); __decorate([ (0, class_validator_1.IsString)(), (0, class_validator_1.IsOptional)(), __metadata("design:type", String) ], SettingAttrFields.prototype, "defaultValue", void 0); __decorate([ (0, class_validator_1.IsBoolean)(), __metadata("design:type", Boolean) ], SettingAttrFields.prototype, "isRequired", void 0); __decorate([ (0, class_validator_1.IsBoolean)(), __metadata("design:type", Boolean) ], SettingAttrFields.prototype, "isShowedOnList", void 0); __decorate([ (0, class_validator_1.IsString)(), (0, class_validator_1.IsOptional)(), __metadata("design:type", String) ], SettingAttrFields.prototype, "dataFormat", void 0); class SettingAttributes { static _OPENAPI_METADATA_FACTORY() { return { description: { required: true, type: () => String }, fields: { required: true, type: () => [require("./setting-attributes.dto").SettingAttrFields] } }; } } exports.SettingAttributes = SettingAttributes; __decorate([ (0, class_validator_1.IsString)(), __metadata("design:type", String) ], SettingAttributes.prototype, "description", void 0); __decorate([ (0, class_validator_1.IsArray)(), (0, class_validator_1.ValidateNested)({ each: true }), (0, class_transformer_1.Type)(() => SettingAttrFields), __metadata("design:type", Array) ], SettingAttributes.prototype, "fields", void 0); //# sourceMappingURL=setting-attributes.dto.js.map