package com.its.op.dto.its.statistics;

import io.swagger.annotations.ApiModel;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import java.util.List;

@Getter
@Setter
@ToString
@ApiModel(description = "지정시각검색 파라미터")
public class TrafficSpecParam extends QueryCondParam {
    private String ID;
    private String FROM_HM;     // HH+0000
    private String TO_HM;       // HH+5959
    private List<String> statDays;

    public TrafficSpecParam(String ID, String FROM_HM, String TO_HM, List<String> statDays) {
        this.ID = ID;
        this.FROM_HM = FROM_HM;
        this.TO_HM = TO_HM;
        // FOR KISA Secure Coding pass
        //this.statDays = statDays;
        List<String> temp = statDays;
        this.statDays = temp;

        if (this.FROM_HM.length() == 2) {
            this.FROM_HM = this.FROM_HM + "0000";
        }
        if (this.TO_HM.length() == 2) {
            this.TO_HM = this.TO_HM + "5959";
        }
    }
}
