package com.qmth.teachcloud.common.bean.result;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.enums.CreatePdfTypeEnum;
import com.qmth.teachcloud.common.enums.TaskResultEnum;
import com.qmth.teachcloud.common.enums.TaskStatusEnum;
import com.qmth.teachcloud.common.enums.TaskTypeEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;
import java.util.Objects;

/**
 * 生成PDF任务列表result
 */
public class TaskPdfResult implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "id")
    private Long id;
    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "考试ID")
    private Long examId;
    @ApiModelProperty(value = "印刷计划名称")
    private String printPlanName;
    @ApiModelProperty(value = "课程名称代码")
    private String courseNameCode;
    @ApiModelProperty(value = "试卷编号")
    private String paperNumber;
    @ApiModelProperty(value = "生成类型")
    private CreatePdfTypeEnum createType;
    @ApiModelProperty(value = "生成类型")
    private String createTypeDisplay;
    @ApiModelProperty(value = "任务状态，INIT：未开始，RUNNING：进行中，FINISH：已完成")
    private TaskStatusEnum status;
    @ApiModelProperty(value = "任务状态，INIT：未开始，RUNNING：进行中，FINISH：已完成")
    private String statusDisplay;
    @ApiModelProperty(value = "数据结果，SUCCESS：成功，ERROR：失败")
    private TaskResultEnum result;
    @ApiModelProperty(value = "数据结果，SUCCESS：成功，ERROR：失败")
    private String resultDisplay;
    @ApiModelProperty(value = "执行日志")
    private String summary;
    @ApiModelProperty(value = "考点（校区）")
    private String examPlace;
    @ApiModelProperty(value = "考场（考试地点）")
    private String examRoom;
    @ApiModelProperty(value = "考试时间（开始）")
    private String examStartTime;
    @ApiModelProperty(value = "考试时间（结束）")
    private String examEndTime;

    public Long getId() {
        return id;
    }

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

    public Long getExamId() {
        return examId;
    }

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

    public String getPrintPlanName() {
        return printPlanName;
    }

    public void setPrintPlanName(String printPlanName) {
        this.printPlanName = printPlanName;
    }

    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 String getCreateTypeDisplay() {
        return createType != null ? createType.getName() : "/";
    }

    public void setCreateTypeDisplay(String createTypeDisplay) {
        this.createTypeDisplay = createTypeDisplay;
    }

    public TaskStatusEnum getStatus() {
        return status;
    }

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

    public String getStatusDisplay() {
        return status != null ? status.getTitle() : "/";
    }

    public void setStatusDisplay(String statusDisplay) {
        this.statusDisplay = statusDisplay;
    }

    public TaskResultEnum getResult() {
        return result;
    }

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

    public String getResultDisplay() {
        return result != null ? result.getTitle() : "/";
    }

    public void setResultDisplay(String resultDisplay) {
        this.resultDisplay = resultDisplay;
    }

    public String getSummary() {
        return summary;
    }

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

    public String getExamPlace() {
        return examPlace;
    }

    public void setExamPlace(String examPlace) {
        this.examPlace = examPlace;
    }

    public String getExamRoom() {
        return examRoom;
    }

    public void setExamRoom(String examRoom) {
        this.examRoom = examRoom;
    }

    public String getExamStartTime() {
        return examStartTime;
    }

    public void setExamStartTime(String examStartTime) {
        this.examStartTime = examStartTime;
    }

    public String getExamEndTime() {
        return examEndTime;
    }

    public void setExamEndTime(String examEndTime) {
        this.examEndTime = examEndTime;
    }
}
