package org.dromara.safety.domain.bo;

import org.dromara.safety.domain.BusQuestionBank;
import org.dromara.common.mybatis.core.domain.BaseEntity;
import org.dromara.common.core.validate.AddGroup;
import org.dromara.common.core.validate.EditGroup;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import lombok.EqualsAndHashCode;
import jakarta.validation.constraints.*;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;

/**
 * 题库业务对象 bus_question_bank
 *
 * @author lcj
 * @date 2025-03-24
 */
@Data
@EqualsAndHashCode(callSuper = true)
@AutoMapper(target = BusQuestionBank.class, reverseConvertGenerate = false)
public class BusQuestionBankBo extends BaseEntity {

    /**
     * 主键id
     */
    @NotNull(message = "主键id不能为空", groups = { EditGroup.class })
    private Long id;

    /**
     * 题目类别
     */
    @NotBlank(message = "题目类别不能为空", groups = { AddGroup.class, EditGroup.class })
    private String categoryType;

    /**
     * 题目类型
     */
    @NotBlank(message = "题目类型不能为空", groups = { AddGroup.class, EditGroup.class })
    private String questionType;

    /**
     * 题目内容
     */
    @NotBlank(message = "题目内容不能为空", groups = { AddGroup.class, EditGroup.class })
    private String questionContent;

    /**
     * 选项（以JSON数组形式存储）
     */
    @NotBlank(message = "选项（以JSON数组形式存储）不能为空", groups = { AddGroup.class, EditGroup.class })
    private String options;

    /**
     * 正确答案
     */
    @NotBlank(message = "正确答案不能为空", groups = { AddGroup.class, EditGroup.class })
    private String correctAnswer;


}
