package com.qmth.distributed.print.business.entity;

import com.baomidou.mybatisplus.annotation.*;

import java.io.Serializable;

import com.qmth.teachcloud.common.enums.CreatePdfTypeEnum;
import com.qmth.teachcloud.common.enums.TaskResultEnum;
import com.qmth.teachcloud.common.enums.TaskStatusEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

/**
 * <p>
 * pdf生成日志表
 * </p>
 *
 * @author xf
 * @since 2024-02-06
 */
@TableName("t_b_task_pdf")
@ApiModel(value = "TBTaskPdf对象", description = "pdf生成日志表")
public class TBTaskPdf implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "主键（与exam_detail表id一致）")
    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    @ApiModelProperty(value = "学校ID")
    private Long schoolId;

    @ApiModelProperty(value = "学期ID")
    private Long semesterId;

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

    @ApiModelProperty(value = "印刷计划ID")
    private Long printPlanId;

    @ApiModelProperty(value = "课程名称")
    private String courseNameCode;

    @ApiModelProperty(value = "试卷编号")
    private String paperNumber;
    @ApiModelProperty(value = "生成pdf类型")
    private CreatePdfTypeEnum createType;

    @ApiModelProperty(value = "任务状态，INIT：未开始，RUNNING：进行中，FINISH：已完成")
    private TaskStatusEnum status;

    @ApiModelProperty(value = "实时摘要信息")
    private String summary;

    @ApiModelProperty(value = "数据结果，SUCCESS：成功，ERROR：失败")
    @TableField(updateStrategy = FieldStrategy.IGNORED)
    private TaskResultEnum result;

    @ApiModelProperty(value = "创建人")
    private Long createId;

    @ApiModelProperty(value = "创建时间")
    private Long createTime;

    @ApiModelProperty(value = "更新人")
    private Long updateId;

    @ApiModelProperty(value = "更新时间")
    private Long updateTime;

    @ApiModelProperty(value = "备注")
    private String remark;

    public TBTaskPdf() {
    }

    public TBTaskPdf(Long id, Long schoolId, Long semesterId, Long examId, Long printPlanId, String courseNameCode, String paperNumber, Long createId) {
        this.id = id;
        this.schoolId = schoolId;
        this.semesterId = semesterId;
        this.examId = examId;
        this.printPlanId = printPlanId;
        this.courseNameCode = courseNameCode;
        this.paperNumber = paperNumber;
        this.createId = createId;
        this.createTime = System.currentTimeMillis();
        this.status = TaskStatusEnum.INIT;
        this.createType = CreatePdfTypeEnum.ALL;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getSchoolId() {
        return schoolId;
    }

    public void setSchoolId(Long schoolId) {
        this.schoolId = schoolId;
    }

    public Long getSemesterId() {
        return semesterId;
    }

    public void setSemesterId(Long semesterId) {
        this.semesterId = semesterId;
    }

    public Long getExamId() {
        return examId;
    }

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

    public Long getPrintPlanId() {
        return printPlanId;
    }

    public void setPrintPlanId(Long printPlanId) {
        this.printPlanId = printPlanId;
    }

    public String getCourseNameCode() {
        return courseNameCode;
    }

    public void setCourseNameCode(String courseNameCode) {
        this.courseNameCode = courseNameCode;
    }

    public String getPaperNumber() {
        return paperNumber;
    }

    public void setPaperNumber(String paperNumber) {
        this.paperNumber = paperNumber;
    }

    public CreatePdfTypeEnum getCreateType() {
        return createType;
    }

    public void setCreateType(CreatePdfTypeEnum createType) {
        this.createType = createType;
    }

    public TaskStatusEnum getStatus() {
        return status;
    }

    public void setStatus(TaskStatusEnum status) {
        this.status = status;
    }

    public String getSummary() {
        return summary;
    }

    public void setSummary(String summary) {
        this.summary = summary;
    }

    public TaskResultEnum getResult() {
        return result;
    }

    public void setResult(TaskResultEnum result) {
        this.result = result;
    }

    public Long getCreateId() {
        return createId;
    }

    public void setCreateId(Long createId) {
        this.createId = createId;
    }

    public Long getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Long createTime) {
        this.createTime = createTime;
    }

    public Long getUpdateId() {
        return updateId;
    }

    public void setUpdateId(Long updateId) {
        this.updateId = updateId;
    }

    public Long getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Long updateTime) {
        this.updateTime = updateTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    @Override
    public String toString() {
        return "TBTaskPdf{" +
                "id=" + id +
                ", schoolId=" + schoolId +
                ", semesterId=" + semesterId +
                ", examId=" + examId +
                ", printPlanId=" + printPlanId +
                ", courseNameCode=" + courseNameCode +
                ", paperNumber=" + paperNumber +
                ", status=" + status +
                ", summary=" + summary +
                ", result=" + result +
                ", createId=" + createId +
                ", createTime=" + createTime +
                ", updateId=" + updateId +
                ", updateTime=" + updateTime +
                ", remark=" + remark +
                "}";
    }
}
