"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.CommentDto = exports.commentSchema = void 0;
const account_dto_1 = require("../../account/dto/account.dto");
const translate_1 = require("../../i18n/translate");
const create_zod_dto_without_date_1 = require("../../shared/dto-modification/create-zod-dto-without-date");
const zod_1 = require("zod");
exports.commentSchema = zod_1.z.object({
    id: zod_1.z.string().uuid({
        message: (0, translate_1.translate)('model.comment.id.uuid'),
    }),
    content: zod_1.z.string().min(1, {
        message: (0, translate_1.translate)('model.comment.content.min'),
    }),
    createdBy: account_dto_1.accountSchema.shape.id,
    profileId: account_dto_1.accountSchema.shape.id,
    isSolvable: zod_1.z
        .boolean({
        required_error: (0, translate_1.translate)('model.comment.isSolvable.required'),
    })
        .default(false),
    isSolved: zod_1.z.boolean().default(false),
    solvedAt: zod_1.z.date().nullable(),
    solvedBy: account_dto_1.accountSchema.shape.id.optional(),
    created_at: zod_1.z.date(),
    updated_at: zod_1.z.date(),
});
class CommentDto extends (0, create_zod_dto_without_date_1.createZodDtoWithoutDate)(exports.commentSchema) {
}
exports.CommentDto = CommentDto;
//# sourceMappingURL=comment.dto.js.map