package com.qmth.teachcloud.exchange.common.bean.dto.flow;

import com.baomidou.mybatisplus.annotation.FieldStrategy;
import com.baomidou.mybatisplus.annotation.TableField;
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.exchange.common.base.BaseEntity;
import com.qmth.teachcloud.exchange.common.enums.flow.TFCustomModelTypeEnum;
import com.qmth.teachcloud.exchange.common.enums.flow.TFCustomTypeEnum;
import io.swagger.annotations.ApiModelProperty;

import java.io.Serializable;

/**
 * @Description: 流程基础消息dto
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2023/6/14
 */
@JsonInclude(JsonInclude.Include.NON_NULL)
public class StandardFlowData extends BaseEntity implements Serializable {

    @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 = "模式类型，USER_FIXED：指定人员,APPROVE_SET：发起人指定")
    private TFCustomModelTypeEnum modelType;

    @ApiModelProperty(value = "流程类型，ELECTRON_FLOW：电子交卷审核，QUESTION_ELECTRON_FLOW：题库试题提交审核，PAPER_ELECTRON_FLOW：题库试卷审核")
    private TFCustomTypeEnum type;

    @ApiModelProperty(value = "是否启用，0：停用，1：启用")
    @TableField(value = "enable", updateStrategy = FieldStrategy.IGNORED)
    private Boolean enable;

    @ApiModelProperty(value = "是否发布，0：否，1：是")
    @TableField(value = "publish", updateStrategy = FieldStrategy.IGNORED)
    private Boolean publish;

    @ApiModelProperty(value = "自定义流程源数据")
    private String objectData;

    @ApiModelProperty(value = "版本号")
    private Integer version;

    @ApiModelProperty(value = "最后更新人")
    private String updateName;

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

    public Long getFlowId() {
        return flowId;
    }

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

    public String getUpdateName() {
        return updateName;
    }

    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }

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

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

    public TFCustomModelTypeEnum getModelType() {
        return modelType;
    }

    public void setModelType(TFCustomModelTypeEnum modelType) {
        this.modelType = modelType;
    }

    public TFCustomTypeEnum getType() {
        return type;
    }

    public void setType(TFCustomTypeEnum type) {
        this.type = type;
    }

    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;
    }

    public String getObjectData() {
        return objectData;
    }

    public void setObjectData(String objectData) {
        this.objectData = objectData;
    }

    public Integer getVersion() {
        return version;
    }

    public void setVersion(Integer version) {
        this.version = version;
    }
}
