package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;


import java.util.Date;
import java.util.List;

@TableName(value = "wx_flow_record")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxFlowRecord extends BaseEntity {
	private static final long serialVersionUID = 1849242743274278L;


    private Long id;
	@io.swagger.annotations.ApiModelProperty(value="业务id",name="businessId")
	private Long businessId;
	@io.swagger.annotations.ApiModelProperty(value="业务类型1合同审批2账单审批3合同终止",name="businessType")
	private Integer businessType;
	@io.swagger.annotations.ApiModelProperty(value="用户id",name="userId")
	private Long userId;
	@io.swagger.annotations.ApiModelProperty(value="姓名",name="userName")
	private String userName;
	@io.swagger.annotations.ApiModelProperty(value="审批意见",name="remark")
	private String remark;
	@io.swagger.annotations.ApiModelProperty(value="状态1发起申请2审批通过3审批驳回4待审批5合同作废6撤回",name="status")
	private Integer status;
	@io.swagger.annotations.ApiModelProperty(value="任务id",name="taskId")
	private String taskId;
	@io.swagger.annotations.ApiModelProperty(value="流程实例id",name="processInstanceId")
	private String processInstanceId;
	//申请时间
	@io.swagger.annotations.ApiModelProperty(value="申请时间",name="startDate")
	private Date startDate;
	@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
	private Date createDate;
	@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")
	private Date updateDate;
	private String tenantId;
	private String taskKey;	// key
	private String taskName;// 名称
	@io.swagger.annotations.ApiModelProperty(value="当前状态同apply_status0未审核1审核中2审核完成3驳回4合同作废5撤回",name="currStatus")
	private Integer currStatus;// 当前状态
	@io.swagger.annotations.ApiModelProperty(value="流程附加值",name="variables")
	private String variables;// 流程附加值
	private String contractType;
	private String contractNumber;
	private Integer endProperty;

	@TableField(exist = false)
	protected List<Long> ids;
	//是否最后一个启动节点
	@TableField(exist = false)
	private Integer isLastStart;
	@TableField(exist = false)
	private Integer limit;
	//1普通 2会签 3或签
	@TableField(exist = false)
	private Integer taskType;

	//coupon 操作类型
	@TableField(exist = false)
	private Integer approvalType;

	public WxFlowRecord(){}
	public WxFlowRecord(Long businessId){
		this.businessId = businessId;
	}
	public WxFlowRecord(String processInstanceId,Integer currStatus){
		this.processInstanceId = processInstanceId;
		this.currStatus = currStatus;
	}
	public WxFlowRecord(Long businessId,String tenantId){
		this.businessId = businessId;
		this.tenantId = tenantId;
	}
	public WxFlowRecord(Long businessId,String tenantId,Integer approvalType){
		this.businessId = businessId;
		this.tenantId = tenantId;
		this.approvalType = approvalType;
	}
}
