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.teachcloud.common.enums.FlowApproveOperationEnum;
import com.qmth.teachcloud.common.enums.FlowApprovePassEnum;

import java.util.Objects;

/**
 * @Date: 2021/4/1.
 */
public class ReviewLogDto {

    @JsonSerialize(using = ToStringSerializer.class)
    private Long id;
    private FlowApproveOperationEnum approvePass;
    private String reviewStatus;
    private String reason;
    private String setUp;
    private String operateId;
    private String operateName;
    private Long operateTime;

    public FlowApproveOperationEnum getApprovePass() {
        return approvePass;
    }

    public void setApprovePass(FlowApproveOperationEnum approvePass) {
        this.approvePass = approvePass;
    }

    public Long getId() {
        return id;
    }

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

    public String getReviewStatus() {
        if (Objects.nonNull(approvePass)) {
            return approvePass.getTitle();
        } else {
            return reviewStatus;
        }
    }

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

    public String getReason() {
        return reason;
    }

    public void setReason(String reason) {
        this.reason = reason;
    }

    public String getOperateId() {
        return operateId;
    }

    public void setOperateId(String operateId) {
        this.operateId = operateId;
    }

    public String getOperateName() {
        return operateName;
    }

    public void setOperateName(String operateName) {
        this.operateName = operateName;
    }

    public Long getOperateTime() {
        return operateTime;
    }

    public void setOperateTime(Long operateTime) {
        this.operateTime = operateTime;
    }

    public String getSetUp() {
        return setUp;
    }

    public void setSetUp(String setUp) {
        this.setUp = setUp;
    }
}
