package com.its.op.dto.its.vms;

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

import javax.validation.constraints.PositiveOrZero;
import java.io.Serializable;

/**
 * VMS 교통 정보 표출 일정 DTO Class
 */
@Data
@Builder
@ApiModel("VmsFormDrawTrafDto(VMS 교통 정보 폼 그리기)")
public class VmsFormDrawTrafDto implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty("VMS FORM ID")  // Y NUMBER(5)
    @JsonProperty("vms_form_id")
    private Integer vmsFormId;

    @ApiModelProperty("VMS FORM 이미지")  // Y BLOB
    @JsonProperty("vms_form_imag")
    private byte[] vmsFormImag;

    @ApiModelProperty("VMS FORM 이미지 형식(bmp, png)")
    @JsonProperty("imag_fmt")
    private String imagFmt;

    @ApiModel("VmsFormDrawTrafReq(VMS 교통 정보 폼 그리기 요청)")
    @Getter
    @Setter
    @ToString
    @NoArgsConstructor//(access = AccessLevel.PROTECTED)
    public static class VmsFormDrawTrafReq {

        @ApiModelProperty("1단 VMS 정보제공구간 ID, Nullable = Y, NUMBER(10)")  // Y NUMBER(10)
        @JsonProperty("frst_vms_ifsc_id")
        private Long frstVmsIfscId;

        @ApiModelProperty("2단 VMS 정보제공구간 ID, Nullable = Y, NUMBER(10)")  // Y NUMBER(10)
        @JsonProperty("secd_vms_ifsc_id")
        @PositiveOrZero
        private Long secdVmsIfscId;

        @ApiModelProperty("3단 VMS 정보제공구간 ID, Nullable = Y, NUMBER(10)")  // Y NUMBER(10)
        @JsonProperty("thir_vms_ifsc_id")
        private Long thirVmsIfscId;

        @ApiModelProperty("4단 VMS 정보제공구간 ID, Nullable = Y, NUMBER(10)")  // Y NUMBER(10)
        @JsonProperty("four_vms_ifsc_id")
        private Long fourVmsIfscId;

        @Builder
        public VmsFormDrawTrafReq(Long vms_ctlr_nmbr, String trfc_situ_type_cd, Integer phase, Integer vms_form_id, Long frst_vms_ifsc_id, Long secd_vms_ifsc_id, String vms_form_prrt_cd, Integer dspl_hh, String dspl_strt_hh, String dspl_end_hh, Long thir_vms_ifsc_id, Long four_vms_ifsc_id, String use_yn, Long frst_img_ifsc_id, Long secd_img_ifsc_id, Long thir_img_ifsc_id, Long four_img_ifsc_id) {
            this.frstVmsIfscId = frst_vms_ifsc_id;
            this.secdVmsIfscId = secd_vms_ifsc_id;
            this.thirVmsIfscId = thir_vms_ifsc_id;
            this.fourVmsIfscId = four_vms_ifsc_id;
        }
    }
}
