package com.ynfy.buss.practice.userpractice.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.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.util.Date;

/**
 * @Description: 用户练习表
 * @Author: jeecg-boot
 * @Date: 2023-11-19
 * @Version: V1.0
 */
@Data
@TableName("user_practice")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value = "user_practice对象", description = "用户练习表")
public class UserPractice implements Serializable {
    private static final long serialVersionUID = 1L;

    /**
     * 主键
     */
    @TableId(type = IdType.ASSIGN_ID)
    @ApiModelProperty(value = "主键")
    private String id;
    /**
     * 用户id
     */
    @Excel(name = "用户id", width = 15)
    @ApiModelProperty(value = "用户id")
    private String userId;

    /**
     * 练习名称
     */
    @Excel(name = "练习名称", width = 15)
    @ApiModelProperty(value = "练习名称")
    private String practiceName;

    /**
     * 练习类型，1.题库练习，2.每日一练
     */
    @Excel(name = "练习类型，1.题库练习，2.每日一练", width = 15)
    @ApiModelProperty(value = "练习类型，1.题库练习，2.每日一练")
    private Integer type;
    /**
     * 题库id
     */
    @Excel(name = "题库id", width = 15)
    @ApiModelProperty(value = "题库id")
    private String repositoryId;
    /**
     * 练习模式：1.顺序练习，2.随机练习，3.题型练习
     */
    @Excel(name = "练习模式：1.顺序练习，2.随机练习，3.题型练习", width = 15)
    @ApiModelProperty(value = "练习模式：1.顺序练习，2.随机练习，3.题型练习")
    private Integer mode;
    /**
     * 题型
     */
    @Excel(name = "题型", width = 15)
    @ApiModelProperty(value = "题型")
    private Integer questionType;
    /**
     * 答对数量
     */
    @Excel(name = "答对数量", width = 15)
    @ApiModelProperty(value = "答对数量")
    private Integer rightNumber;
    /**
     * 总题数量
     */
    @Excel(name = "总题数量", width = 15)
    @ApiModelProperty(value = "总题数量")
    private Integer totalNumber;
    /**
     * 正确率
     */
    @Excel(name = "正确率", width = 15)
    @ApiModelProperty(value = "正确率")
    private Double accuracy;
    /**
     * 提交时间
     */
    @Excel(name = "提交时间", width = 20, format = "yyyy-MM-dd HH:mm:ss")
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "提交时间")
    private Date commitTime;
    /**
     * 创建人
     */
    @ApiModelProperty(value = "创建人")
    private String createBy;
    /**
     * 创建日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建日期")
    private Date createTime;
    /**
     * 更新人
     */
    @ApiModelProperty(value = "更新人")
    private String updateBy;
    /**
     * 更新日期
     */
    @JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "更新日期")
    private Date updateTime;

    @TableField(exist = false)
    private String repositoryName;
}
