package org.jeecg.modules.workFlow.flowplus.workflow.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;
import java.util.List;

/**
 * 流程动作记录
 *

 */
@Getter
@Setter
@TableName(value = "wflow_instance_action_record", autoResultMap = true)
@ApiModel(value = "WflowInstanceActionRecord对象", description = "流程动作记录")
public class WflowInstanceActionRecord implements Serializable {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty("ID")
    @TableId(value = "id", type = IdType.ASSIGN_ID)
    private String id;

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

    @ApiModelProperty("评论")
    @TableField("`comment`")
    private String comment;

    @ApiModelProperty("附件")
    @TableField(typeHandler = com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
    private List<String> attachments;

    @ApiModelProperty("创建时间")
    @JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date createTime;

    @ApiModelProperty("抄送或者自动审批的话为true")
    private Boolean robot;

    @ApiModelProperty("审批办理人id")
    private String auditorId;

    @ApiModelProperty("动作类型")
    private Integer actionType;

    @ApiModelProperty("用户的ids,例如抄送的人可以放进来")
    @TableField(typeHandler = com.baomidou.mybatisplus.extension.handlers.JacksonTypeHandler.class)
    private List<String> userIds;

    @ApiModelProperty("分配人ID，例如加签给谁，减签给谁，转交给谁ID")
    private String assigneeId;

    @ApiModelProperty("flowlong中的nodeName,例如加签、减签、转交给谁，将当前节点记录一下")
    private String nodeId;

    @ApiModelProperty("租户id")
    private String tenantId;
}
