package org.jeecg.module.custom.ocr.api.entity;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

@Data
public class TaskCompletionRequest {
    @JSONField(name = "status")
    private Integer status;

    @JSONField(name = "message")
    private String message;

    @JSONField(name = "timestamp")
    private Long timestamp;

    @JSONField(name = "signature")
    private String signature;

    @JSONField(name = "data")
    private String data;

    @Data
    public static class TaskCompletionData {
        @JSONField(name = "tenantNo")
        private Long tenantNo;

        @JSONField(name = "accountNo")
        private Long accountNo;

        @JSONField(name = "taskNo")
        private Long taskNo;

        @JSONField(name = "approveResult")
        private Integer approveResult;

        @JSONField(name = "approveRemark")
        private String approveRemark;

        @JSONField(name = "pictureMatchDegree")
        private BigDecimal pictureMatchDegree;

        @JSONField(name = "extendField")
        private String extendField;

        @JSONField(name = "isPictureRepeat")
        private Integer isPictureRepeat;

        @JSONField(name = "isPictureRight")
        private Integer isPictureRight;

        @JSONField(name = "isBriefRepeat")
        private Integer isBriefRepeat;

        @JSONField(name = "pictureRepeatList")
        private List<PictureRepeat> pictureRepeatList;

        @JSONField(name = "falseImgList")
        private List<Long> falseImgList;

        @JSONField(name = "briefRepeatTaskList")
        private List<Long> briefRepeatTaskList;

        @JSONField(name = "approveDetailList")
        private List<ApproveDetail> approveDetailList;
    }

    @Data
    public static class PictureRepeat {
        @JSONField(name = "imgNo")
        private Long imgNo;

        @JSONField(name = "imgUrl")
        private String imgUrl;

        @JSONField(name = "dynamicFields")
        private Map<String, String> dynamicFields;

        @JSONField(name = "hisPictureRepeatList")
        private List<HisPictureRepeat> hisPictureRepeatList;
    }

    @Data
    public static class HisPictureRepeat {
        @JSONField(name = "hisTaskNo")
        private Long hisTaskNo;

        @JSONField(name = "hisRepeatImgNo")
        private Long hisRepeatImgNo;

        @JSONField(name = "hisRepeatImgUrl")
        private String hisRepeatImgUrl;
    }

    @Data
    public static class ApproveDetail {
        @JSONField(name = "nodeName")
        private String nodeName;

        @JSONField(name = "approveByName")
        private String approveByName;

        @JSONField(name = "approveWay")
        private Integer approveWay;

        @JSONField(name = "approveResult")
        private Integer approveResult;

        @JSONField(name = "reason")
        private String reason;

        @JSONField(name = "processMethod")
        private Integer processMethod;

        @JSONField(name = "approveRemark")
        private String approveRemark;

        @JSONField(name = "extendField")
        private String extendField;

        @JSONField(name = "isPictureRight")
        private Integer isPictureRight;

        @JSONField(name = "isPictureRepeat")
        private Integer isPictureRepeat;

        @JSONField(name = "isBriefRepeat")
        private Integer isBriefRepeat;
    }
}
