"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.extendPlanoChangeImageSchema = exports.planoChangeImageSchema = exports.planoDeleteSchema = exports.editPlanoSchema = exports.extendCreatePlanoSchema = exports.createPlanoSchema = void 0;
const zod_1 = require("zod");
const zod_to_openapi_1 = require("@asteasolutions/zod-to-openapi");
const validation_1 = require("../../util/validation");
(0, zod_to_openapi_1.extendZodWithOpenApi)(zod_1.z);
exports.createPlanoSchema = zod_1.z.object({
    designacao: (0, validation_1.requiredString)('designacao'),
    emolumentoId: (0, validation_1.requiredNumber)('emolumentoId'),
    valor: (0, validation_1.requiredString)('valor'),
    descricao: zod_1.z.string().optional(),
    customField: zod_1.z.string().optional(),
    userId: (0, validation_1.requiredNumber)('userId'),
});
exports.extendCreatePlanoSchema = exports.createPlanoSchema.extend({
    imagem: (0, validation_1.fileSchema)('imagem').optional(),
});
exports.editPlanoSchema = zod_1.z.object({
    planoId: (0, validation_1.requiredNumber)('planoId'),
    designacao: zod_1.z.string().optional(),
    valor: zod_1.z.string().optional(),
    descricao: zod_1.z.string().optional(),
    customField: zod_1.z.string().optional(),
    userId: (0, validation_1.requiredNumber)('userId'),
});
exports.planoDeleteSchema = zod_1.z.object({
    planoId: (0, validation_1.requiredNumber)('planoId'),
    userId: (0, validation_1.requiredNumber)('userId'),
});
exports.planoChangeImageSchema = zod_1.z.object({
    id: (0, validation_1.requiredNumber)('id'),
    userId: (0, validation_1.requiredNumber)('userId'),
});
exports.extendPlanoChangeImageSchema = exports.planoChangeImageSchema.extend({
    imagem: (0, validation_1.fileSchema)('imagem')
});
