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 io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * <p>
 * 流程表
 * </p>
 *
 * @author wangliang
 * @since 2021-08-02
 */
@ApiModel(value = "TFFlow对象", description = "流程表")
public class TFFlow 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 = "流程名称")
    private String name;

    @ApiModelProperty(value = "流程key")
    private String flowKey;

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

    @ApiModelProperty(value = "是否发布，0：否，1：是")
    private Boolean publish;

    @ApiModelProperty(value = "流程id")
    private String actFlowId;

    public TFFlow() {

    }

    public TFFlow(Long schoolId, Long orgId, String name, Long userId, String flowKey, String actFlowId) {
        this.schoolId = schoolId;
        this.orgId = orgId;
        this.name = name;
        this.flowKey = flowKey;
        this.actFlowId = actFlowId;
        insertInfo(userId);
    }

    public TFFlow(Long schoolId, Long orgId, String name, Boolean publish, Long userId, String flowKey, String actFlowId) {
        this.schoolId = schoolId;
        this.orgId = orgId;
        this.name = name;
        this.publish = publish;
        this.flowKey = flowKey;
        this.actFlowId = actFlowId;
        insertInfo(userId);
    }

    public String getActFlowId() {
        return actFlowId;
    }

    public void setActFlowId(String actFlowId) {
        this.actFlowId = actFlowId;
    }

    public String getFlowKey() {
        return flowKey;
    }

    public void setFlowKey(String flowKey) {
        this.flowKey = flowKey;
    }

    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 String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Boolean getEnable() {
        return enable;
    }

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

    public Boolean getPublish() {
        return publish;
    }

    public void setPublish(Boolean publish) {
        this.publish = publish;
    }
}
