package com.codvision.workflow.entity;

import com.baomidou.mybatisplus.annotation.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;

/**
 * @author hxl
 */
@Data
@ApiModel
@Builder
@NoArgsConstructor
@AllArgsConstructor
@TableName("tbl_work_flow_delay_record")
public class WorkFlowDelayRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty("流程实例ID")
    private String instanceId;

    @ApiModelProperty("业务ID")
    private Integer bizId;

    @ApiModelProperty("原截止时间")
    private String oldDeadline;

    @ApiModelProperty("新截止时间")
    private String newDeadline;

    @ApiModelProperty("申请人ID")
    private Integer applicantUid;

    @ApiModelProperty("申请人所属组织")
    private Integer applicantOid;

    @ApiModelProperty("申请人姓名")
    private String applicantName;

    @ApiModelProperty("申请人联系电话")
    private String applicantTel;

    @ApiModelProperty("申请原因")
    private String reason;

    @ApiModelProperty("审核人ID")
    private Integer reviewerUid;

    @ApiModelProperty("审核人OID")
    private Integer reviewerOid;

    @ApiModelProperty("审核人角色ID")
    private Integer reviewerRoleId;

    @ApiModelProperty("审核人姓名")
    private String reviewerName;

    @ApiModelProperty("审核人联系电话")
    private String reviewerTel;

    @ApiModelProperty("审核意见")
    private String comment;

    @ApiModelProperty("审核时间")
    private String auditTime;

    @ApiModelProperty("审核状态，0-待审核|1-审核通过|2-审核未通过")
    private Integer status;

    @ApiModelProperty("延期类型，0-节点延期 1-全局延期")
    private Integer type;

    @Transient
    @ApiModelProperty("流程定义ID")
    private String definitionId;

    @Transient
    @ApiModelProperty("流程部署ID")
    private String deployId;

    @TableField(fill = FieldFill.INSERT)
    @ApiModelProperty("创建时间")
    private Date createTime;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @ApiModelProperty("更新时间")
    private Date updateTime;
}
