package com.its.web.dto.traffic;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.*;

import javax.validation.constraints.Positive;

@Data
@NoArgsConstructor
@AllArgsConstructor
@ApiModel("도로 vertex DTO)")
public class VertexDto {

    @ApiModelProperty("도로 ID")
    @JsonProperty("roadway_id")
    private String roadwayId;

    @ApiModelProperty("도로 명")
    @JsonProperty("roadway_nm")
    private String roadwayNm;

    @ApiModelProperty("간선도로 ID")
    @JsonProperty("atrd_id")
    private String atrdID;

    @ApiModelProperty("시작 노드명")
    @JsonProperty("strt_nm_node")
    private String strtNmNode;

    @ApiModelProperty("도로 명")
    @JsonProperty("end_nm_node")
    private String endNmNode;

    @ApiModelProperty("X 좌표")
    @JsonProperty("x_crdn")
    private String xCrdn;

    @ApiModelProperty("Y 좌표")
    @JsonProperty("y_crdn")
    private String yCrdn;

    @ApiModelProperty("X 최소값 좌표")
    @JsonProperty("x_crdn_min")
    private Double xCrdnMin;

    @ApiModelProperty("Y 최소값 좌표")
    @JsonProperty("y_crdn_min")
    private Double yCrdnMin;

    @ApiModelProperty("X 최대값 좌표")
    @JsonProperty("x_crdn_max")
    private Double xCrdnMax;

    @ApiModelProperty("Y 최대값 좌표")
    @JsonProperty("y_crdn_max")
    private Double yCrdnMax;

    @ApiModelProperty("소통 등급")
    @JsonProperty("cmtr_grad_cd")
    private String cmtrGradCd;

    @ApiModelProperty("속도")
    @JsonProperty("sped")
    private String sped;

    @ApiModelProperty("소요시간")
    @JsonProperty("trvl_hh")
    private String trvlHh;

    @ApiModelProperty("소통등급 명")
    @JsonProperty("grad_nm")
    private String gradNm;

    @ApiModel("VertexDtoReq(도로 Vertex 파리미터)")
    @Getter
    @Setter
    @ToString
    @NoArgsConstructor
    public static class VertexDtoReq {
        @ApiModelProperty("도로 레벨")
        @JsonProperty("levl")
        @Positive
        private Integer levl;

        @ApiModelProperty("X좌표 최대값")
        @JsonProperty("swLat")
        private Double swLat;

        @ApiModelProperty("X좌표 최소값")
        @JsonProperty("neLat")
        private Double neLat;

        @ApiModelProperty("Y좌표 최대값")
        @JsonProperty("swLng")
        private Double swLng;

        @ApiModelProperty("Y좌표 최소값")
        @JsonProperty("neLng")
        private Double neLng;
    }
}
