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

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.qmth.teachcloud.common.base.BaseEntity;
import com.qmth.teachcloud.common.contant.SystemConstant;
import com.qmth.teachcloud.common.enums.FlowApproveOperationEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 流程审批记录
 * </p>
 *
 * @author wangliang
 * @since 2021-08-05
 */
@ApiModel(value = "TFFlowApproveLog对象", description = "流程审批记录")
public class TFFlowApproveLog extends BaseEntity implements Serializable {

    private static final long serialVersionUID = 1L;

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

    @ApiModelProperty(value = "机构id")
    @JsonSerialize(using = ToStringSerializer.class)
    @TableField(value = "org_id", updateStrategy = FieldStrategy.IGNORED)
    private Long orgId;

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

    @ApiModelProperty(value = "命题任务id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long taskId;

    @ApiModelProperty(value = "发起人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long startId;

    @ApiModelProperty(value = "一级审核人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long primaryApproveId;

    @ApiModelProperty(value = "一级审核人意见")
    private String primaryApproveRemark;

    @ApiModelProperty(value = "一级审核人操作，SUBMIT：提交，APPROVE：审批，REJECT：驳回，END：终止")
    private FlowApproveOperationEnum primaryApproveOperation;

    @ApiModelProperty(value = "二级审核人id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long secondApproveId;

    @ApiModelProperty(value = "二级审核人意见")
    private String secondApproveRemark;

    @ApiModelProperty(value = "二级审核人操作，SUBMIT：提交，APPROVE：审批，REJECT：驳回，END：终止")
    private FlowApproveOperationEnum secondApproveOperation;

    @ApiModelProperty(value = "是否启用，0：停用，1：启用")
    private Boolean enable;

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

    public TFFlowApproveLog() {

    }

    public TFFlowApproveLog(Long schoolId, Long orgId, Long flowId, Long taskId, Long startId, Long userId) {
        setId(SystemConstant.getDbUuid());
        this.schoolId = schoolId;
        this.orgId = orgId;
        this.flowId = flowId;
        this.taskId = taskId;
        this.startId = startId;
        insertInfo(userId);
    }

    public String getRemark() {
        return remark;
    }

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

    public Long getSchoolId() {
        return schoolId;
    }

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

    public Long getOrgId() {
        return orgId;
    }

    public void setOrgId(Long orgId) {
        this.orgId = orgId;
    }

    public static long getSerialVersionUID() {
        return serialVersionUID;
    }

    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 Long getStartId() {
        return startId;
    }

    public void setStartId(Long startId) {
        this.startId = startId;
    }

    public Long getPrimaryApproveId() {
        return primaryApproveId;
    }

    public void setPrimaryApproveId(Long primaryApproveId) {
        this.primaryApproveId = primaryApproveId;
    }

    public String getPrimaryApproveRemark() {
        return primaryApproveRemark;
    }

    public void setPrimaryApproveRemark(String primaryApproveRemark) {
        this.primaryApproveRemark = primaryApproveRemark;
    }

    public FlowApproveOperationEnum getPrimaryApproveOperation() {
        return primaryApproveOperation;
    }

    public void setPrimaryApproveOperation(FlowApproveOperationEnum primaryApproveOperation) {
        this.primaryApproveOperation = primaryApproveOperation;
    }

    public Long getSecondApproveId() {
        return secondApproveId;
    }

    public void setSecondApproveId(Long secondApproveId) {
        this.secondApproveId = secondApproveId;
    }

    public String getSecondApproveRemark() {
        return secondApproveRemark;
    }

    public void setSecondApproveRemark(String secondApproveRemark) {
        this.secondApproveRemark = secondApproveRemark;
    }

    public FlowApproveOperationEnum getSecondApproveOperation() {
        return secondApproveOperation;
    }

    public void setSecondApproveOperation(FlowApproveOperationEnum secondApproveOperation) {
        this.secondApproveOperation = secondApproveOperation;
    }

    public Boolean getEnable() {
        return enable;
    }

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