"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.CreateVisitorPassDto = void 0;
const client_1 = require("@prisma/client");
const swagger_1 = require("@nestjs/swagger");
const class_transformer_1 = require("class-transformer");
const class_validator_1 = require("class-validator");
const swagger_docs_1 = require("../../common/swagger-docs");
class CreateVisitorPassDto {
    estateId;
    hostResidentId;
    visitorId;
    validFrom;
    validUntil;
    passType;
    maxEntries;
}
exports.CreateVisitorPassDto = CreateVisitorPassDto;
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.ESTATE_ID_EXAMPLE, description: 'Estate that owns this visitor pass.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CreateVisitorPassDto.prototype, "estateId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.RESIDENT_ID_EXAMPLE, description: 'Resident hosting the visitor. Must belong to the estate.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CreateVisitorPassDto.prototype, "hostResidentId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.VISITOR_ID_EXAMPLE, description: 'Visitor receiving the pass. Must belong to the estate.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CreateVisitorPassDto.prototype, "visitorId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: '2026-05-16T08:00:00.000Z', description: 'Start of pass validity window.' }),
    (0, class_transformer_1.Type)(() => Date),
    (0, class_validator_1.IsDate)(),
    __metadata("design:type", Date)
], CreateVisitorPassDto.prototype, "validFrom", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: '2026-05-16T18:00:00.000Z', description: 'End of pass validity window. Must be after validFrom.' }),
    (0, class_transformer_1.Type)(() => Date),
    (0, class_validator_1.IsDate)(),
    __metadata("design:type", Date)
], CreateVisitorPassDto.prototype, "validUntil", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ enum: client_1.VisitorPassType, example: client_1.VisitorPassType.SINGLE_USE, description: 'Pass policy type.' }),
    (0, class_validator_1.IsEnum)(client_1.VisitorPassType),
    __metadata("design:type", String)
], CreateVisitorPassDto.prototype, "passType", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: 1, description: 'Maximum allowed entries. Defaults to 1 for SINGLE_USE, 999 otherwise.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsInt)(),
    (0, class_validator_1.Min)(1),
    __metadata("design:type", Number)
], CreateVisitorPassDto.prototype, "maxEntries", void 0);
//# sourceMappingURL=create-visitor-pass.dto.js.map