package com.its.vds.entity;

import com.its.vds.dto.TbVdsCtlrDto;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;

import java.io.Serializable;

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

    private Long vdsCtlrNmbr;
    private String vdsCtlrId;
    private String vdsNm;
    private String vdsCtlrIp;
    private Integer vdsCtlrPort;
    private Integer vdsCtlrLocalNo;
    private String vdsTypeCd;
    private String istlLctnNm;
    private Integer groupNo;
    private Integer fanMode;
    private Integer fanRunTmpr;
    private Integer hetrMode;
    private Integer hetrRunTmpr;
    private Integer detectLanes;
    private Integer trafClctCycl;
    private Integer sttsClctCycl;
    private String istlLctnAddr;
    private String validYn;
    private String delYn;

    public TbVdsCtlrDto toDto() {
        return TbVdsCtlrDto.builder()
                .vdsCtlrNmbr(this.vdsCtlrNmbr)
                .vdsCtlrId(this.vdsCtlrId)
                .vdsNm(this.vdsNm)
                .vdsCtlrIp(this.vdsCtlrIp)
                .vdsCtlrPort(this.vdsCtlrPort)
                .vdsCtlrLocalNo(this.vdsCtlrLocalNo)
                .vdsTypeCd(this.vdsTypeCd)
                .istlLctnNm(this.istlLctnNm)
                .groupNo(this.groupNo)
                .fanMode(this.fanMode)
                .fanRunTmpr(this.fanRunTmpr)
                .hetrMode(this.hetrMode)
                .hetrRunTmpr(this.hetrRunTmpr)
                .detectLanes(this.detectLanes)
                .trafClctCycl(this.trafClctCycl)
                .sttsClctCycl(this.sttsClctCycl)
                .istlLctnAddr(this.istlLctnAddr)
                .validYn(this.validYn)
                .delYn(this.delYn)
                .build();
    }

}
