"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TagDto = exports.tagSchema = void 0;
const tag_group_dto_1 = require("../../tag-group/dto/tag-group.dto");
const translate_1 = require("../../i18n/translate");
const zod_nestjs_1 = require("@anatine/zod-nestjs");
const zod_1 = require("zod");
const prisma_schema_1 = require("../../../types/prisma-schema/index.js");
exports.tagSchema = zod_1.z.object({
    id: zod_1.z.string().uuid({
        message: (0, translate_1.translate)('model.tag.id.uuid'),
    }),
    name: zod_1.z
        .string({
        required_error: (0, translate_1.translate)('model.tag.name.required'),
    })
        .min(1, {
        message: (0, translate_1.translate)('model.tag.name.min'),
    }),
    groupId: tag_group_dto_1.tagGroupSchema.shape.id,
    type: zod_1.z.nativeEnum(prisma_schema_1.TagType, {
        message: (0, translate_1.translate)('model.tag.type.invalid'),
    }),
    created_at: zod_1.z.string().datetime(),
    updated_at: zod_1.z.string().datetime(),
});
class TagDto extends (0, zod_nestjs_1.createZodDto)(exports.tagSchema) {
}
exports.TagDto = TagDto;
//# sourceMappingURL=tag.dto.js.map