package com.yaoyicloud.dto;

import javax.validation.constraints.NotNull;

import com.yaoyicloud.constant.enums.ModuleType;
import com.yaoyicloud.constant.enums.ReportType;
import lombok.AccessLevel;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.Map;

/**
 * 报告DTO
 *
 * @author snows
 * @date 2024/10/14
 */
@NoArgsConstructor(access = AccessLevel.NONE)
public class ReportDTO {

    /**
     * 创建新版报告参数
     *
     * @author snows
     * @date 2024/10/14
     */
    @Data
    public static class OnCreatePlusVersionReport {

        @NotNull(message = "map数据必填")
        private String data;

        @NotNull(message = "moduleType必填")
        private ModuleType moduleType;


    }

    /**
     * 老版报告数据接受
     */
    @Data
    public static class OnCreateVersionReport {

        @NotNull(message = "map数据必填")
        private Map<String, Object> data;

        @NotNull(message = "模版必填")
        private String reportTempFile;

        @NotNull(message = "导出pdf路径必填")
        private String reportBastPath;

        @NotNull(message = "reportType必填")
        private ReportType reportType;

        @NotNull(message = "reportType必填")
        private  Long relationId;
    }

    /**
     * 老版报告数据接受
     */
    @Data
    public static class CsoReport {

        /**
         * protobuf json串
         */
        @NotNull(message = "map数据必填")
        private String data;

        /**
         * 模块标识
         */
        @NotNull(message = "moduleType必填")
        private ModuleType moduleType;
        /**
         * 是否合并文档
         */
        @NotNull(message = "mergeflag")
        private Boolean mergeflag;
    }
}
