package com.hz.pm.api.dashboard.model.vo;

import com.hz.pm.api.dashboard.constant.DashboardConstant;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Builder;
import lombok.Data;

/**
 * @author ZPF
 * @date 2023/10/9 下午3:07
 */

@Data
@Builder
@ApiModel("驾驶舱项目画像里的项目产出VO")
public class ProtraitProjectOutputVO {

    public ProtraitProjectOutputVO(){

    }

    public ProtraitProjectOutputVO(String name,CloudResourceUsage cloudResourceUsage,DataUsage dataUsage,
                                   ComponentUsage componentUsage,GenerateData generateData,OperationReport operationReport){
        this.name = name;
        this.cloudResourceUsage = cloudResourceUsage;
        this.dataUsage = dataUsage;
        this.componentUsage = componentUsage;
        this.generateData = generateData;
        this.operationReport = operationReport;
    }

    @ApiModelProperty("名称")
    private String name;

    @ApiModelProperty("云资源使用情况")
    private CloudResourceUsage cloudResourceUsage = new CloudResourceUsage();

    @ApiModelProperty("数据使用情况")
    private DataUsage dataUsage = new DataUsage();

    @ApiModelProperty("组件使用情况")
    private ComponentUsage componentUsage = new ComponentUsage();

    @ApiModelProperty("产生数据")
    private GenerateData generateData = new GenerateData();

    @ApiModelProperty("试运行报告")
    private OperationReport operationReport = new OperationReport();

    @Data
    public static class CloudResourceUsage{
        @ApiModelProperty("云资源实例使用数")
        private String instancesNum = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("云资源实例利用率")
        private String utilizationRate = DashboardConstant.Protrait.NONE;
    }

    @Data
    public static class DataUsage{
        @ApiModelProperty("数据共享申请量")
        private String sharedApplicationVolume = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("数据共享使用量")
        private String sharedUsage = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("数据共享接口调用量")
        private String sharedInterfaceCallVolume = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("协同接口使用量")
        private String collaborativeInterfaceCallVolume= DashboardConstant.Protrait.NONE;
    }

    @Data
    public static class ComponentUsage{
        @ApiModelProperty("组件申请量")
        private String applicationVolume = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("组件使用量")
        private String useVolume = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("组件调用量")
        private String callVolume = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("统一组件调用量")
        private String unifyCallolVolume = DashboardConstant.Protrait.NONE;
    }

    @Data
    public static class GenerateData{
        @ApiModelProperty("产生数据量")
        private String volume = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("产生数据共享申请量")
        private String sharedApplicationVolume = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("产生数据共享使用量")
        private String sharedUseVolume = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("产生数据审批通过率")
        private String approvalPassRate = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("数据接口被调用量")
        private String dataInterfaceCallsVolume  = DashboardConstant.Protrait.NONE;

        @ApiModelProperty("协同接口使用量")
        private String collaborativeInterfaceCallVolume = DashboardConstant.Protrait.NONE;
    }

    @Data
    public static class OperationReport{
        @ApiModelProperty("试运行报告通过率")
        private String passRate = DashboardConstant.Protrait.NONE;
    }
}

