package com.its.vms.entity;

import com.its.vms.dto.TbVmsIncdDto;
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 TbVmsIncd implements Serializable {
    private static final long serialVersionUID = 1L;

    private Long vmsCtlrNmbr;
    private Long linkId;
    private Long ifscId;
    private Long vmsIfscId;
    private String vmsIfscNm;
    private String dsplStrtNodeNm;
    private String dsplEndNodeNm;
    private Long detrId;
    private Integer dsplPrrt;
    private String incdOcrrId;
    private String strtLctnNm;
    private String roadNm;
    private String spotNm;
    private String endLctnNm;
    private String ocrrLctnNm;
    private String incdTitl;
    private String vmsIncdTypeNm;
    private String vmsIncdTypeCd;
    private String vmsIncdDetlNm;
    private String vmsIncdDetlTypeCd;
    private String cmtrGradNm;
    private String cmtrGradCd;
    private String incdClsrLane;
    private String incdStrtDt;
    private String incdEndPrarDt;

    private String vmsIncdRstrTypeCd;
    private String vmsIncdRstrTypeNm;

    public TbVmsIncdDto toDto() {
        return TbVmsIncdDto.builder()
                .vmsCtlrNmbr(this.vmsCtlrNmbr)
                .linkId(this.linkId)
                .ifscId(this.ifscId)
                .vmsIfscId(this.vmsIfscId)
                .vmsIfscNm(this.vmsIfscNm)
                .dsplStrtNodeNm(this.dsplStrtNodeNm)
                .dsplEndNodeNm(this.dsplEndNodeNm)
                .detrId(this.detrId)
                .dsplPrrt(this.dsplPrrt)
                .incdOcrrId(this.incdOcrrId)
                .strtLctnNm(this.strtLctnNm)
                .roadNm(this.roadNm)
                .spotNm(this.spotNm)
                .endLctnNm(this.endLctnNm)
                .ocrrLctnNm(this.ocrrLctnNm)
                .incdTitl(this.incdTitl)
                .vmsIncdTypeNm(this.vmsIncdTypeNm)
                .vmsIncdTypeCd(this.vmsIncdTypeCd)
                .vmsIncdDetlNm(this.vmsIncdDetlNm)
                .vmsIncdDetlTypeCd(this.vmsIncdDetlTypeCd)
                .cmtrGradNm(this.cmtrGradNm)
                .cmtrGradCd(this.cmtrGradCd)
                .incdClsrLane(this.incdClsrLane)
                .incdStrtDt(this.incdStrtDt)
                .incdEndPrarDt(this.incdEndPrarDt)
                .vmsIncdRstrTypeCd(this.vmsIncdRstrTypeCd)
                .vmsIncdRstrTypeNm(this.vmsIncdRstrTypeNm)
                .build();
    }
}
