/**
 * @projectName willalp-pns-ml
 * @package com.willalp.flow.domain.req
 * @className com.willalp.flow.domain.vo.FileApprovalVo
 * @copyright Copyright 2019 HuiShan, Inc All rights reserved.
 */
package com.willalp.flow.domain.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * FileApprovalVo
 * @description 文件审批上传伪类
 * @author hs
 * @date 2022/12/9 18:30
 * @version 1.0
 */
@NoArgsConstructor
@Data
public class FileApprovalVo {

    /**
     * 审批标题
     */
    private String title;

    /**
     * 附件列表
     */
    private List<FileItemVo> fileList;

    /**
     * 图片列表
     */
    private List<FileItemVo> imgList;

    /**
     * 申请人user_code
     */
    private String applyUserId;

    /**
     * 申请人
     */
    private String applyUserName;

    @Data
    public static class FileItemVo {
        @JsonProperty("url")
        private String url;
        @JsonProperty("name")
        private String name;
        @JsonProperty("uid")
        private Long uid;
        @JsonProperty("status")
        private String status;
    }

    /**
     * 请求参数
     */
    @TableField(exist = false)
    private Map<String, Object> params;

    public Map<String, Object> getParams() {
        if (params == null) {
            params = new HashMap<>();
        }
        return params;
    }
}
 