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

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.distributed.print.business.enums.FlowJoinTypeEnum;
import com.qmth.teachcloud.common.bean.dto.BlurryUserDto;
import com.qmth.teachcloud.common.enums.ExamModelEnum;
import com.qmth.teachcloud.common.enums.FlowStatusEnum;
import io.swagger.annotations.ApiModelProperty;

import java.util.List;
import java.util.Objects;

/**
 * @Date: 2021/3/31.
 */
public class ExamTaskDto {

    private String id;
    private String paperNumber;
    private String courseCode;
    private String courseName;
    private String sequence;
    private String specialty;
    private String cardRuleId;
    private String cardRuleName;
    private String userId;
    private String userName;
    private Long startTime;
    private Long endTime;
    private String status;
    private Boolean review;
    private Boolean enable;
    private String createId;
    private String createName;
    private Long createTime;
    private String auditStatus;
    private String reviewStatus;
    private String teacherName;
    private String lecturerName;
    private String teachingRoomName;
    private String flowId;
    private Integer setup;
    private FlowStatusEnum flowStatus;
    private String flowStatusStr;
    private String statusStr;
    private List<BlurryUserDto> users;
    private boolean myself;
    @ApiModelProperty(value = "审批表展示状态")
    private Boolean approveFormStatus;

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

    @ApiModelProperty(value = "考试名称")
    private String examName;

    @JsonSerialize(using = ToStringSerializer.class)
    @ApiModelProperty(value = "学期id")
    private Long semesterId;

    @ApiModelProperty(value = "学期名称")
    private String semesterName;

    @ApiModelProperty(value = "考试模式")
    private ExamModelEnum examModel;

    @ApiModelProperty(value = "审批次数")
    private Integer approveCount;

    @ApiModelProperty(value = "流程类型")
    private FlowJoinTypeEnum flowType;

    public Integer getApproveCount() {
        return approveCount;
    }

    public void setApproveCount(Integer approveCount) {
        this.approveCount = approveCount;
    }

    public FlowJoinTypeEnum getFlowType() {
        return flowType;
    }

    public void setFlowType(FlowJoinTypeEnum flowType) {
        this.flowType = flowType;
    }

    public Boolean getApproveFormStatus() {
        return approveFormStatus;
    }

    public void setApproveFormStatus(Boolean approveFormStatus) {
        this.approveFormStatus = approveFormStatus;
    }

    public boolean isMyself() {
        return myself;
    }

    public void setMyself(boolean myself) {
        this.myself = myself;
    }

    public FlowStatusEnum getFlowStatus() {
        return flowStatus;
    }

    public void setFlowStatus(FlowStatusEnum flowStatus) {
        this.flowStatus = flowStatus;
    }

    public String getFlowStatusStr() {
        if (Objects.nonNull(flowStatus)) {
            return flowStatus.getTitle();
        } else {
            return flowStatusStr;
        }
    }

    public void setFlowStatusStr(String flowStatusStr) {
        this.flowStatusStr = flowStatusStr;
    }

    public String getStatusStr() {
        return statusStr;
    }

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

    public String getId() {
        return id;
    }

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

    public String getPaperNumber() {
        return paperNumber;
    }

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

    public String getCourseCode() {
        return courseCode;
    }

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

    public String getCourseName() {
        return courseName;
    }

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

    public String getSequence() {
        return sequence;
    }

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

    public String getSpecialty() {
        return specialty;
    }

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

    public Boolean getReview() {
        return review;
    }

    public void setReview(Boolean review) {
        this.review = review;
    }

    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 getUserId() {
        return userId;
    }

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

    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 String getStatus() {
        return status;
    }

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

    public Boolean getEnable() {
        return enable;
    }

    public void setEnable(Boolean enable) {
        this.enable = enable;
    }

    public String getCreateId() {
        return createId;
    }

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

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }

    public Long getCreateTime() {
        return createTime;
    }

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

    public List<BlurryUserDto> getUsers() {
        return users;
    }

    public void setUsers(List<BlurryUserDto> users) {
        this.users = users;
    }

    public String getAuditStatus() {
        return auditStatus;
    }

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

    public String getReviewStatus() {
        return reviewStatus;
    }

    public void setReviewStatus(String reviewStatus) {
        this.reviewStatus = reviewStatus;
    }

    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 getFlowId() {
        return flowId;
    }

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

    public Integer getSetup() {
        return setup;
    }

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

    public Long getExamId() {
        return examId;
    }

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

    public String getExamName() {
        return examName;
    }

    public void setExamName(String examName) {
        this.examName = examName;
    }

    public Long getSemesterId() {
        return semesterId;
    }

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

    public String getSemesterName() {
        return semesterName;
    }

    public void setSemesterName(String semesterName) {
        this.semesterName = semesterName;
    }

    public ExamModelEnum getExamModel() {
        return examModel;
    }

    public void setExamModel(ExamModelEnum examModel) {
        this.examModel = examModel;
    }
}
