"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.PayFiadoDto = exports.CreateFiadoDto = exports.UpdateCustomerDto = exports.CreateCustomerDto = void 0; const swagger_1 = require("@nestjs/swagger"); const class_validator_1 = require("class-validator"); class CreateCustomerDto { } exports.CreateCustomerDto = CreateCustomerDto; __decorate([ (0, swagger_1.ApiProperty)({ description: 'Nombre del cliente', example: 'Juan Pérez' }), (0, class_validator_1.IsString)(), (0, class_validator_1.MaxLength)(200), __metadata("design:type", String) ], CreateCustomerDto.prototype, "name", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Teléfono', example: '5512345678' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), (0, class_validator_1.MaxLength)(20), __metadata("design:type", String) ], CreateCustomerDto.prototype, "phone", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'WhatsApp', example: '5512345678' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), (0, class_validator_1.MaxLength)(20), __metadata("design:type", String) ], CreateCustomerDto.prototype, "whatsapp", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Email', example: 'juan@email.com' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsEmail)(), (0, class_validator_1.MaxLength)(255), __metadata("design:type", String) ], CreateCustomerDto.prototype, "email", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Dirección' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreateCustomerDto.prototype, "address", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Notas adicionales' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreateCustomerDto.prototype, "notes", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Habilitar fiado', default: false }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsBoolean)(), __metadata("design:type", Boolean) ], CreateCustomerDto.prototype, "fiadoEnabled", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Límite de fiado', example: 500 }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsNumber)(), (0, class_validator_1.Min)(0), __metadata("design:type", Number) ], CreateCustomerDto.prototype, "fiadoLimit", void 0); class UpdateCustomerDto extends (0, swagger_1.PartialType)(CreateCustomerDto) { } exports.UpdateCustomerDto = UpdateCustomerDto; class CreateFiadoDto { } exports.CreateFiadoDto = CreateFiadoDto; __decorate([ (0, swagger_1.ApiProperty)({ description: 'ID del cliente' }), (0, class_validator_1.IsUUID)(), __metadata("design:type", String) ], CreateFiadoDto.prototype, "customerId", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'ID de la venta asociada' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsUUID)(), __metadata("design:type", String) ], CreateFiadoDto.prototype, "saleId", void 0); __decorate([ (0, swagger_1.ApiProperty)({ description: 'Monto del fiado', example: 150.5 }), (0, class_validator_1.IsNumber)(), (0, class_validator_1.Min)(0.01), __metadata("design:type", Number) ], CreateFiadoDto.prototype, "amount", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Descripción del fiado' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreateFiadoDto.prototype, "description", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Fecha de vencimiento' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], CreateFiadoDto.prototype, "dueDate", void 0); class PayFiadoDto { } exports.PayFiadoDto = PayFiadoDto; __decorate([ (0, swagger_1.ApiProperty)({ description: 'Monto a pagar', example: 50 }), (0, class_validator_1.IsNumber)(), (0, class_validator_1.Min)(0.01), __metadata("design:type", Number) ], PayFiadoDto.prototype, "amount", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Método de pago', default: 'cash' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), (0, class_validator_1.MaxLength)(20), __metadata("design:type", String) ], PayFiadoDto.prototype, "paymentMethod", void 0); __decorate([ (0, swagger_1.ApiPropertyOptional)({ description: 'Notas del pago' }), (0, class_validator_1.IsOptional)(), (0, class_validator_1.IsString)(), __metadata("design:type", String) ], PayFiadoDto.prototype, "notes", void 0); //# sourceMappingURL=customer.dto.js.map