package com.hdkj.lt.modle.dto.recon;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import lombok.NoArgsConstructor;

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

/**
 * 开关状态 (switchResult): summary 字符串(折叠进主表) + details 详情(1:N).
 */
@Data
@NoArgsConstructor
@JsonIgnoreProperties(ignoreUnknown = true)
public class SwitchResultDTO {

    @JsonProperty("summary")
    private String summary;

    @JsonProperty("details")
    private List<SwitchResultDetailDTO> details;

    @Data
    @NoArgsConstructor
    @JsonIgnoreProperties(ignoreUnknown = true)
    public static class SwitchResultDetailDTO {

        @JsonProperty("psrID")
        private String psrId;

        @JsonProperty("psrType")
        private String psrType;

        @JsonProperty("node1_rdfid")
        private String node1Rdfid;

        @JsonProperty("node2_rdfid")
        private String node2Rdfid;

        @JsonProperty("autoType")
        private String autoType;

        @JsonProperty("before_state")
        private String beforeState;

        @JsonProperty("before_I")
        private BigDecimal beforeI;

        @JsonProperty("before_U")
        private BigDecimal beforeU;

        @JsonProperty("after_state")
        private String afterState;

        @JsonProperty("after_I")
        private BigDecimal afterI;

        @JsonProperty("after_U")
        private BigDecimal afterU;
    }
}