package com.ltgk.crew.domain.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ltgk.common.annotation.Excel;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.util.Date;
import java.util.List;

/**
 * 题库对象 ds_train_question_bank
 *
 * @author Qi ChengBin
 * @date 2024-12-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName("ds_train_question_bank")
@ApiModel(value = "题库对象", description = "题库表")
public class DsTrainQuestionBank extends Model<DsTrainQuestionBank> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

    @ApiModelProperty(value = "船员培训课程主键")
    @TableField(value = "train_id")
    private String trainId;

    @ApiModelProperty(value = "船员培训课程名称")
    @TableField(value = "train_name")
    private String trainName;

    @Excel(name = "题目")
    @ApiModelProperty(value = "题目")
    @TableField(value = "problem", condition = SqlCondition.LIKE)
    private String problem;

    @Excel(name = "选项a")
    @ApiModelProperty(value = "选项a")
    @TableField(value = "option_a")
    private String optionA;

    @Excel(name = "选项b")
    @ApiModelProperty(value = "选项b")
    @TableField(value = "option_b")
    private String optionB;

    @Excel(name = "选项c")
    @ApiModelProperty(value = "选项c")
    @TableField(value = "option_c")
    private String optionC;

    @Excel(name = "选项d")
    @ApiModelProperty(value = "选项d")
    @TableField(value = "option_d")
    private String optionD;

    @Excel(name = "分值")
    @ApiModelProperty(value = "分值")
    @TableField(value = "score")
    private Integer score;

    @Excel(name = "正确选项")
    @ApiModelProperty(value = "正确选项")
    @TableField(value = "true_option")
    private String trueOption;

    @TableLogic(delval = "1", value = "0")
    @TableField(value = "del_flag")
    @ApiModelProperty(value = "删除标志: 0-未删除, 1-已删除")
    private Integer delFlag;

    @TableField(value = "create_by")
    @ApiModelProperty(value = "创建者")
    private String createBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "create_time")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @TableField(value = "update_by")
    @ApiModelProperty(value = "更新者")
    private String updateBy;

    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    @TableField(value = "update_time")
    @ApiModelProperty(value = "更新时间")
    private Date updateTime;

    @ApiModelProperty(value = "行政区域编码")
    @TableField(value = "area_code")
    private String areaCode;

    @ApiModelProperty(value = "行政区域名称")
    @TableField(value = "area_name")
    private String areaName;

    @ApiModelProperty(value = "选项数组")
    @TableField(exist = false)
    private List<String> options;
}
