package com.ltgk.crew.domain.dto;

import com.baomidou.mybatisplus.annotation.TableLogic;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ltgk.common.core.page.BasePage;
import com.ltgk.common.validation.groups.Add;
import com.ltgk.common.validation.groups.Detail;
import com.ltgk.common.validation.groups.Update;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.validation.constraints.NotNull;
import java.util.Date;

/**
 * 题库对象 ds_train_question_bank
 *
 * @author Qi ChengBin
 * @date 2024-12-06
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel(value = "题库对象", description = "题库表")
public class DsTrainQuestionBankDTO extends BasePage {

    @ApiModelProperty(value = "培训题库主键")
    @NotNull(message = "培训题库主键不能为空", groups = {Update.class, Detail.class})
    private String id;

    @ApiModelProperty(value = "题目")
    @NotNull(message = "题目不能为空", groups = {Update.class, Add.class})
    private String problem;

    @ApiModelProperty(value = "选项a")
    @NotNull(message = "选项a不能为空", groups = {Update.class, Add.class})
    private String optionA;

    @ApiModelProperty(value = "选项b")
    @NotNull(message = "选项b不能为空", groups = {Update.class, Add.class})
    private String optionB;

    @ApiModelProperty(value = "选项c")
    private String optionC;

    @ApiModelProperty(value = "选项d")
    private String optionD;

    @ApiModelProperty(value = "分值")
    @NotNull(message = "分值不能为空", groups = {Update.class, Add.class})
    private Integer score;

    @ApiModelProperty(value = "正确选项")
    @NotNull(message = "正确选项不能为空", groups = {Update.class, Add.class})
    private String trueOption;

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

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

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

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

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

    @ApiModelProperty(value = "行政区域编码")
    @NotNull(message = "行政区域编码不能为空", groups = {Update.class, Add.class})
    private String areaCode;

    @ApiModelProperty(value = "行政区域名称")
    @NotNull(message = "行政区域名称不能为空", groups = {Update.class, Add.class})
    private String areaName;

    @ApiModelProperty(value = "开始时间")
    private String startTime;

    @ApiModelProperty(value = "结束时间")
    private String endTime;
}
