package com.ltgk.crew.domain.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.ltgk.common.annotation.Excel;
import com.ltgk.common.validation.groups.Add;
import com.ltgk.common.validation.groups.Detail;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotBlank;

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

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    @NotBlank(message = "主键不能为空", groups = {Detail.class})
    private String id;

    @Excel(name = "船员ID")
    @ApiModelProperty(value = "船员ID")
    @TableField(value = "crew_id")
    private String crewId;

    @Excel(name = "考试记录ID")
    @ApiModelProperty(value = "考试记录ID；对应船员培训记录表主键")
    @TableField(value = "exam_id")
    @NotBlank(message = "考试记录ID不能为空", groups = {Add.class})
    private String examId;

    @Excel(name = "题库ID")
    @ApiModelProperty(value = "题库ID")
    @TableField(value = "bank_id")
    private String bankId;

    @Excel(name = "选项")
    @ApiModelProperty(value = "选项")
    @TableField(value = "answer_option")
    private String answerOption;

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

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

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