package cn.stylefeng.workflow.instance.modular.task.pojo;

import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import cn.stylefeng.roses.kernel.rule.annotation.EnumFieldFormat;
import cn.stylefeng.roses.kernel.rule.annotation.SimpleFieldFormat;
import cn.stylefeng.roses.kernel.sys.api.format.UserAvatarFormatProcess;
import cn.stylefeng.workflow.api.enums.TaskReadFlagEnum;
import cn.stylefeng.workflow.api.enums.TaskStatusEnum;
import cn.stylefeng.workflow.api.enums.TaskTypeEnum;
import lombok.Data;

import java.util.Date;

@Data
public class ApprovalLog {

    @ChineseDescription("流程审批日志类型：1-本流程日志，2-子流程日志，3-父流程日志")
    private Integer flowApprovalLogType;

    @ChineseDescription("流程设计节点id")
    private Long nodeId;

    @ChineseDescription("节点名称")
    private String nodeName;

    @ChineseDescription("节点处理人")
    @SimpleFieldFormat(processClass = UserAvatarFormatProcess.class)
    private Long processUserId;

    @ChineseDescription("任务类型：10-发起，20-审批，30-抄送，40-征询，50-办理")
    @EnumFieldFormat(processEnum = TaskTypeEnum.class)
    private Integer taskType;

    @ChineseDescription("任务状态：10-发起，15-待开始，20-审批中，30-已审批，40-已拒绝，50-已退回，60-已撤回，70-已关闭，80-已转交")
    @EnumFieldFormat(processEnum = TaskStatusEnum.class)
    private Integer taskStatus;

    @ChineseDescription("任务已读未读状态")
    @EnumFieldFormat(processEnum = TaskReadFlagEnum.class)
    private String readFlag;

    @ChineseDescription("审批创建时间")
    private Date createTime;

    @ChineseDescription("审批开始时间")
    private Date beginTime;

    @ChineseDescription("节点的办理时间")
    private Date approveTime;

    @ChineseDescription("时长")
    private String durationFormat;

    @ChineseDescription("审批意见")
    private String suggestContent;

}
