package com.gkhy.exam.system.domain; 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.fasterxml.jackson.annotation.JsonInclude; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Getter; import lombok.Setter; import org.hibernate.validator.constraints.Length; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; import java.io.Serializable; import java.time.LocalDateTime; import static com.fasterxml.jackson.annotation.JsonInclude.Include.NON_NULL; /** *
* 考题表 *
* * @author kzy * @since 2024-06-06 13:53:17 */ @Getter @Setter @TableName("ex_question") @ApiModel(value = "ExQuestion对象", description = "考题表") @JsonInclude(NON_NULL) public class ExQuestion implements Serializable { private static final long serialVersionUID = 1L; @ApiModelProperty("主键") @TableId(value = "id", type = IdType.AUTO) private Long id; @NotNull(message = "考题类型不能为空") @ApiModelProperty(value = "考题类型(1单选题,2多选题,3判断题 默认1)",required = true) @TableField("question_type") private Integer questionType; @NotNull(message = "题库id不能为空") @ApiModelProperty(value = "题库id",required = true) @TableField("bank_id") private Long bankId; @NotNull(message = "公司id不能为空") @ApiModelProperty("公司id") @TableField("company_id") private Long companyId; @ApiModelProperty("账号状态(0正常,1停用,默认0)") @TableField("status") private Integer status; @NotBlank(message = "答案不能为空") @ApiModelProperty(value = "答案",required = true) @TableField("answer") private String answer; @NotBlank(message = "题目标题不能为空") @Length(min=1,max=300,message = "题目标题不能超过{max}字符") @ApiModelProperty(value = "题目标题",required = true) @TableField("title") private String title; @ApiModelProperty("课程公开私有属性(0私有,1公开 默认0)") @TableField("privatize") private Integer privatize; /** * json格式: * 单选和多选 {"analyze":"",items:[{"prefix":"A","content":"xxxx"},{"prefix":"B","content":"xxxx"},{"prefix":"C","content":"xxxx"},{"prefix":"D","content":"xxxx"}]} * 判断题 {"analyze":""} */ @ApiModelProperty("题目内容(json字符串)") @TableField("content") private String content; @ApiModelProperty("创建时间") @TableField("create_time") private LocalDateTime createTime; @ApiModelProperty("创建人") @TableField("create_by") private String createBy; @ApiModelProperty("更新时间") @TableField("update_time") private LocalDateTime updateTime; @ApiModelProperty("更新人") @TableField("update_by") private String updateBy; @ApiModelProperty("备注") @TableField("remark") private String remark; @ApiModelProperty("乐观锁") @TableField("version") private Integer version; @ApiModelProperty("学员考卷答案") @TableField(exist = false) private ExStudentAnswer studentAnswer; @ApiModelProperty("学员刷题答案") @TableField(exist = false) private ExExerciseAnswer exExerciseAnswer; }