"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.RespondResidentRequestDto = exports.CreateResidentRequestDto = void 0;
const swagger_1 = require("@nestjs/swagger");
const client_1 = require("@prisma/client");
const class_validator_1 = require("class-validator");
const swagger_docs_1 = require("../../common/swagger-docs");
class CreateResidentRequestDto {
    estateId;
    residentId;
    category;
    priority;
    title;
    description;
    metadata;
}
exports.CreateResidentRequestDto = CreateResidentRequestDto;
__decorate([
    (0, swagger_1.ApiProperty)({ example: swagger_docs_1.ESTATE_ID_EXAMPLE, description: 'Estate that owns the request.' }),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CreateResidentRequestDto.prototype, "estateId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: swagger_docs_1.RESIDENT_ID_EXAMPLE, description: 'Resident profile creating the request. Defaults to signed-in resident.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], CreateResidentRequestDto.prototype, "residentId", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ enum: client_1.ResidentRequestCategory, example: client_1.ResidentRequestCategory.SECURITY }),
    (0, class_validator_1.IsEnum)(client_1.ResidentRequestCategory),
    __metadata("design:type", String)
], CreateResidentRequestDto.prototype, "category", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ enum: client_1.ResidentRequestPriority, example: client_1.ResidentRequestPriority.NORMAL }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsEnum)(client_1.ResidentRequestPriority),
    __metadata("design:type", String)
], CreateResidentRequestDto.prototype, "priority", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: 'Suspicious movement near Block B', description: 'Request title.' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MinLength)(3),
    (0, class_validator_1.MaxLength)(120),
    __metadata("design:type", String)
], CreateResidentRequestDto.prototype, "title", void 0);
__decorate([
    (0, swagger_1.ApiProperty)({ example: 'I noticed unknown persons around the street light area.', description: 'Request details.' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MinLength)(5),
    (0, class_validator_1.MaxLength)(1200),
    __metadata("design:type", String)
], CreateResidentRequestDto.prototype, "description", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: { location: 'Block B' }, description: 'Optional request metadata.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsObject)(),
    __metadata("design:type", Object)
], CreateResidentRequestDto.prototype, "metadata", void 0);
class RespondResidentRequestDto {
    message;
    status;
    assignedToId;
    metadata;
}
exports.RespondResidentRequestDto = RespondResidentRequestDto;
__decorate([
    (0, swagger_1.ApiProperty)({ example: 'A patrol has been assigned to check the area.', description: 'Response message.' }),
    (0, class_validator_1.IsString)(),
    (0, class_validator_1.MinLength)(2),
    (0, class_validator_1.MaxLength)(1200),
    __metadata("design:type", String)
], RespondResidentRequestDto.prototype, "message", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ enum: client_1.ResidentRequestStatus, example: client_1.ResidentRequestStatus.IN_PROGRESS }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsEnum)(client_1.ResidentRequestStatus),
    __metadata("design:type", String)
], RespondResidentRequestDto.prototype, "status", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: swagger_docs_1.USER_ID_EXAMPLE, description: 'Optional user assigned to the request.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsString)(),
    __metadata("design:type", String)
], RespondResidentRequestDto.prototype, "assignedToId", void 0);
__decorate([
    (0, swagger_1.ApiPropertyOptional)({ example: { patrol: 'night-shift' }, description: 'Optional response metadata.' }),
    (0, class_validator_1.IsOptional)(),
    (0, class_validator_1.IsObject)(),
    __metadata("design:type", Object)
], RespondResidentRequestDto.prototype, "metadata", void 0);
//# sourceMappingURL=request.dto.js.map