package com.its.vms.dto;

import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;

/**
 *  Entity Class
 */
@Data
@Builder
@NoArgsConstructor//(access = AccessLevel.PROTECTED)
@AllArgsConstructor
public class TbVmsScheduleDto implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long vmsCtlrNmbr;
    private String vmsSchType;
    private Integer vmsSchFormType;
    private Integer phase;
    private Integer vmsFormId;
    private String dsplStrtHh;
    private String dsplEndHh;
    private Integer dsplHh;
    private Long frstVmsIfscId;
    private Long secdVmsIfscId;
    private Long thirVmsIfscId;
    private Long fourVmsIfscId;
    private Long frstImgIfscId;
    private Long secdImgIfscId;
    private Long thirImgIfscId;
    private Long fourImgIfscId;
    private Long symbLibNmbr;
    private String strmAddr;
    private String useYn;
    private boolean dsplCngsYn;
    private Integer vmsFormTypeCd;
    private Integer vmsFormSubTypeCd;

    private int dnldFormId;

    private Long vmsIfscId;         // 돌발 및 이벤트 발생 IFSC_ID
    private TbVmsIncdDto event ;    // 돌발 및 이벤트 발생 정보

    public void initTrafId() {
        this.frstVmsIfscId = 0L;
        this.secdVmsIfscId = 0L;
        this.thirVmsIfscId = 0L;
        this.fourVmsIfscId = 0L;
        this.frstImgIfscId = 0L;
        this.secdImgIfscId = 0L;
        this.thirImgIfscId = 0L;
        this.fourImgIfscId = 0L;
    }

    public TbVmsScheduleDto clone() {
        return TbVmsScheduleDto.builder()
                .vmsCtlrNmbr(this.vmsCtlrNmbr)
                .vmsSchType(this.vmsSchType)
                .vmsSchFormType(this.vmsSchFormType)
                .phase(this.phase)
                .vmsFormId(this.vmsFormId)
                .dsplStrtHh(this.dsplStrtHh)
                .dsplEndHh(this.dsplEndHh)
                .dsplHh(this.dsplHh)
                .frstVmsIfscId(this.frstVmsIfscId)
                .secdVmsIfscId(this.secdVmsIfscId)
                .thirVmsIfscId(this.thirVmsIfscId)
                .fourVmsIfscId(this.fourVmsIfscId)
                .frstImgIfscId(this.frstImgIfscId)
                .secdImgIfscId(this.secdImgIfscId)
                .thirImgIfscId(this.thirImgIfscId)
                .fourImgIfscId(this.fourImgIfscId)
                .symbLibNmbr(this.symbLibNmbr)
                .strmAddr(this.strmAddr)
                .useYn(this.useYn)
                .dsplCngsYn(this.dsplCngsYn)
                .vmsFormTypeCd(this.vmsFormTypeCd)
                .vmsFormSubTypeCd(this.vmsFormSubTypeCd)
                .dnldFormId(this.dnldFormId)
                .vmsIfscId(this.vmsIfscId)
                .event(this.event)
                .build();
    }
}
