package com.qmth.distributed.print.business.bean.result;

import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.contant.SystemConstant;
import com.qmth.teachcloud.common.enums.FlowStatusEnum;
import io.swagger.annotations.ApiModelProperty;

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

/**
 * @Description: 工作台 result
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/4/8
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class WorkResult implements Serializable {

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "主键")
    private Long id;

    @ApiModelProperty(value = "试卷编号")
    String paperNumber;

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

    @ApiModelProperty(value = "课程代码")
    String courseCode;

    @ApiModelProperty(value = "适用专业")
    String specialty;

    @ApiModelProperty(value = "题卡规则ID")
    String cardRuleId;

    @ApiModelProperty(value = "题卡规则名称")
    String cardRuleName;

    @ApiModelProperty(value = "用户ID")
    @JsonSerialize(using = ToStringSerializer.class)
    Long userId;

    @ApiModelProperty(value = "用户名称")
    String userName;

    @ApiModelProperty(value = "命题开始时间")
    Long startTime;

    @ApiModelProperty(value = "命题结束时间")
    Long endTime;

    @ApiModelProperty(value = "流程状态")
    FlowStatusEnum status;

    @ApiModelProperty(value = "流程状态")
    String statusStr;

    @ApiModelProperty(value = "剩余天数")
    Integer remainCount;

    @ApiModelProperty(value = "提交人")
    @JsonSerialize(using = ToStringSerializer.class)
    Long createId;

    @ApiModelProperty(value = "提交时间")
    Long createTime;

    @ApiModelProperty(value = "待办条数")
    Integer count;

    @ApiModelProperty(value = "当前服务器时间")
    Long systemCurrentTime;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "执行id")
    Long executionId;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "流程id")
    Long flowId;

    @ApiModelProperty(value = "任务节点名称")
    String taskName;

    @ApiModelProperty(value = "任务节点key")
    String taskDefKey;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "任务节点id")
    Long taskId;

    @ApiModelProperty(value = "流程步骤")
    Integer setup;

    @ApiModelProperty(value = "拟卷教师")
    String teacherName;

    @ApiModelProperty(value = "主讲教师")
    String lecturerName;

    @ApiModelProperty(value = "教研室")
    String teachingRoomName;

    @ApiModelProperty(value = "命题教师")
    String propositionName;

    @ApiModelProperty(value = "审核状态")
    String auditStatus;

    @ApiModelProperty(value = "考试id")
    @JsonSerialize(using = ToStringSerializer.class)
    Long examId;

    public Long getExamId() {
        return examId;
    }

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

    public String getStatusStr() {
        if (Objects.nonNull(status)) {
            return status.getTitle();
        } else {
            return statusStr;
        }
    }

    public void setStatusStr(String statusStr) {
        this.statusStr = statusStr;
    }

    public Integer getSetup() {
        return setup;
    }

    public void setSetup(Integer setup) {
        this.setup = setup;
    }

    public FlowStatusEnum getStatus() {
        return status;
    }

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

    public String getTaskName() {
        return taskName;
    }

    public void setTaskName(String taskName) {
        this.taskName = taskName;
    }

    public String getTaskDefKey() {
        return taskDefKey;
    }

    public void setTaskDefKey(String taskDefKey) {
        this.taskDefKey = taskDefKey;
    }

    public Long getId() {
        return id;
    }

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

    public String getPaperNumber() {
        return paperNumber;
    }

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

    public String getCourseName() {
        return courseName;
    }

    public void setCourseName(String courseName) {
        this.courseName = courseName;
    }

    public String getCourseCode() {
        return courseCode;
    }

    public void setCourseCode(String courseCode) {
        this.courseCode = courseCode;
    }

    public String getSpecialty() {
        return specialty;
    }

    public void setSpecialty(String specialty) {
        this.specialty = specialty;
    }

    public String getCardRuleId() {
        return cardRuleId;
    }

    public void setCardRuleId(String cardRuleId) {
        this.cardRuleId = cardRuleId;
    }

    public String getCardRuleName() {
        return cardRuleName;
    }

    public void setCardRuleName(String cardRuleName) {
        this.cardRuleName = cardRuleName;
    }

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public Long getStartTime() {
        return startTime;
    }

    public void setStartTime(Long startTime) {
        this.startTime = startTime;
    }

    public Long getEndTime() {
        return endTime;
    }

    public void setEndTime(Long endTime) {
        this.endTime = endTime;
    }

    public Integer getRemainCount() {
        return remainCount;
    }

    public void setRemainCount(Integer remainCount) {
        this.remainCount = remainCount;
    }

    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 Integer getCount() {
        return count;
    }

    public void setCount(Integer count) {
        this.count = count;
    }

    public Long getSystemCurrentTime() {
        return System.currentTimeMillis();
    }

    public void setSystemCurrentTime(Long systemCurrentTime) {
        this.systemCurrentTime = systemCurrentTime;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Long getExecutionId() {
        return executionId;
    }

    public void setExecutionId(Long executionId) {
        this.executionId = executionId;
    }

    public Long getFlowId() {
        return flowId;
    }

    public void setFlowId(Long flowId) {
        this.flowId = flowId;
    }

    public Long getTaskId() {
        return taskId;
    }

    public void setTaskId(Long taskId) {
        this.taskId = taskId;
    }

    public String getTeacherName() {
        return teacherName;
    }

    public void setTeacherName(String teacherName) {
        this.teacherName = teacherName;
    }

    public String getLecturerName() {
        return lecturerName;
    }

    public void setLecturerName(String lecturerName) {
        this.lecturerName = lecturerName;
    }

    public String getTeachingRoomName() {
        return teachingRoomName;
    }

    public void setTeachingRoomName(String teachingRoomName) {
        this.teachingRoomName = teachingRoomName;
    }

    public String getAuditStatus() {
        return auditStatus;
    }

    public void setAuditStatus(String auditStatus) {
        this.auditStatus = auditStatus;
    }

    public String getPropositionName() {
        return propositionName;
    }

    public void setPropositionName(String propositionName) {
        this.propositionName = propositionName;
    }
}
