"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.RegisterDto = void 0;
const class_validator_1 = require("class-validator");
class RegisterDto {
}
exports.RegisterDto = RegisterDto;
__decorate([
    (0, class_validator_1.IsEmail)({}, { message: "El correo no es válido" }),
    (0, class_validator_1.IsNotEmpty)({ message: "El correo es obligatorio" }),
    __metadata("design:type", String)
], RegisterDto.prototype, "correo", void 0);
__decorate([
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)({ message: "La contrasena es obligatoria" }),
    (0, class_validator_1.MinLength)(8, { message: "La contrasena debe tener al menos 8 caracteres" }),
    (0, class_validator_1.Matches)(/^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)/, {
        message: "La contrasena debe contener mayúscula, minúscula y número",
    }),
    __metadata("design:type", String)
], RegisterDto.prototype, "contrasena", void 0);
__decorate([
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)({ message: "El nombre es obligatorio" }),
    (0, class_validator_1.MinLength)(2, { message: "El nombre debe tener al menos 2 caracteres" }),
    (0, class_validator_1.MaxLength)(100),
    __metadata("design:type", String)
], RegisterDto.prototype, "nombre", void 0);
__decorate([
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)({ message: "Los apellidos son obligatorios" }),
    (0, class_validator_1.MinLength)(2, { message: "Los apellidos deben tener al menos 2 caracteres" }),
    (0, class_validator_1.MaxLength)(150),
    __metadata("design:type", String)
], RegisterDto.prototype, "apellidos", void 0);
__decorate([
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)({ message: "El DNI es obligatorio" }),
    (0, class_validator_1.Matches)(/^\d{8}$/, { message: "El DNI debe tener 8 dígitos" }),
    __metadata("design:type", String)
], RegisterDto.prototype, "dni", void 0);
__decorate([
    (0, class_validator_1.IsDateString)({}, { message: "Fecha de nacimiento inválida" }),
    (0, class_validator_1.IsNotEmpty)({ message: "La fecha de nacimiento es obligatoria" }),
    __metadata("design:type", String)
], RegisterDto.prototype, "fechaNacimiento", void 0);
__decorate([
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)({ message: "El teléfono es obligatorio" }),
    (0, class_validator_1.Matches)(/^\d{9}$/, { message: "El teléfono debe tener 9 dígitos" }),
    __metadata("design:type", String)
], RegisterDto.prototype, "telefono", void 0);
__decorate([
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)({ message: "El RUC es obligatorio" }),
    (0, class_validator_1.Matches)(/^\d{11}$/, { message: "El RUC debe tener 11 dígitos" }),
    __metadata("design:type", String)
], RegisterDto.prototype, "ruc", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(200),
    __metadata("design:type", String)
], RegisterDto.prototype, "razonSocial", void 0);
__decorate([
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MaxLength)(20),
    __metadata("design:type", String)
], RegisterDto.prototype, "codigoReferidos", void 0);
__decorate([
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)({ message: "Selecciona si quieres vender o comprar" }),
    __metadata("design:type", String)
], RegisterDto.prototype, "accountType", void 0);
__decorate([
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.IsNotEmpty)({ message: "Selecciona cómo nos encontraste" }),
    __metadata("design:type", String)
], RegisterDto.prototype, "comoNosEncontraste", void 0);
__decorate([
    (0, class_validator_1.IsBoolean)({ message: "Debes aceptar los términos y condiciones" }),
    __metadata("design:type", Boolean)
], RegisterDto.prototype, "aceptaTerminos", void 0);
//# sourceMappingURL=register.dto.js.map