package org.dromara.safety.domain.vo;

import com.alibaba.excel.annotation.ExcelIgnoreUnannotated;
import com.alibaba.excel.annotation.ExcelProperty;
import io.github.linpeilie.annotations.AutoMapper;
import lombok.Data;
import org.dromara.common.excel.annotation.ExcelDictFormat;
import org.dromara.common.excel.convert.ExcelDictConvert;
import org.dromara.safety.domain.BusQuestionBank;

import java.io.Serial;
import java.io.Serializable;
import java.util.List;


/**
 * 题库视图对象 bus_question_bank
 *
 * @author lcj
 * @date 2025-03-24
 */
@Data
@ExcelIgnoreUnannotated
@AutoMapper(target = BusQuestionBank.class)
public class BusQuestionBankVo implements Serializable {

    @Serial
    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @ExcelProperty(value = "主键id")
    private Long id;

    /**
     * 题目类别
     */
    @ExcelProperty(value = "题目类别", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "safety_question_category_type")
    private String categoryType;

    /**
     * 题目类型
     */
    @ExcelProperty(value = "题目类型", converter = ExcelDictConvert.class)
    @ExcelDictFormat(dictType = "safety_question_type")
    private String questionType;

    /**
     * 题目内容
     */
    @ExcelProperty(value = "题目内容")
    private String questionContent;

    /**
     * 选项（以JSON数组形式存储）
     */
    @ExcelProperty(value = "选项", converter = ExcelDictConvert.class)
    @ExcelDictFormat(readConverterExp = "以=JSON数组形式存储")
    private List<String> optionList;

    /**
     * 正确答案
     */
    @ExcelProperty(value = "正确答案")
    private String correctAnswer;


}
