package com.qmth.paper.library.common.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.github.jeffreyning.mybatisplus.anno.MppMultiId;
import com.qmth.paper.library.common.enums.ExceptionResultEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * 
 * </p>
 *
 * @author xf
 * @since 2024-08-01
 */
@TableName("basic_batch_number")
@ApiModel(value="BasicBatchNumber对象", description="")
public class BasicBatchNumber implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "考试ID")
    @MppMultiId(value = "exam_id")
    private Long examId;

    @ApiModelProperty(value = "用户ID")
    @MppMultiId(value = "user_id")
    private Long userId;

    @ApiModelProperty(value = "字母（前缀）")
    private String alphabet;

    @ApiModelProperty(value = "序号")
    private Integer sequence;

    @TableField(exist = false)
    private String batchNo;

    public BasicBatchNumber() {
    }

    public BasicBatchNumber(Long examId, Long userId) {
        this.examId = examId;
        this.userId = userId;
    }

    public BasicBatchNumber(Long examId, Long userId, String alphabet, Integer sequence) {
        this.examId = examId;
        this.userId = userId;
        this.alphabet = alphabet;
        this.sequence = sequence;
    }

    public Long getExamId() {
        return examId;
    }

    public void setExamId(Long examId) {
        this.examId = examId;
    }
    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }
    public String getAlphabet() {
        return alphabet;
    }

    public void setAlphabet(String alphabet) {
        this.alphabet = alphabet;
    }
    public Integer getSequence() {
        return sequence;
    }

    public void setSequence(Integer sequence) {
        this.sequence = sequence;
    }

    public String getBatchNo() {
        return this.alphabet + this.sequence;
    }

    public void setBatchNo(String batchNo) {
        this.batchNo = batchNo;
    }

    @Override
    public String toString() {
        return "BasicBatchNumber{" +
            "examId=" + examId +
            ", userId=" + userId +
            ", alphabet=" + alphabet +
            ", sequence=" + sequence +
        "}";
    }
}
