package com.its.vds.entity;

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

    private Long vdsDtctNmbr;
    private String vdsDtctId;
    private String vdsDtctNm;
    private Long vdsCtlrNmbr;
    private Integer vdsCmraNo;
    private String dtctType;
    private String dtctDir;
    private Integer detectLane;
    private Integer istlLane;
    private String spedClctYn;
    private String tfvlClctYn;
    private String ocpyClctYn;
    private Integer maxTfvl;
    private Integer minTfvl;
    private Double maxOcpyRate;
    private Double minOcpyRate;
    private Integer maxSped;
    private Integer minSped;
    private String useYn;
    private String delYn;

    public TbVdsDtctDto toDto() {
        return TbVdsDtctDto.builder()
                .vdsDtctNmbr(this.vdsDtctNmbr)
                .vdsDtctId(this.vdsDtctId)
                .vdsDtctNm(this.vdsDtctNm)
                .vdsCtlrNmbr(this.vdsCtlrNmbr)
                .vdsCmraNo(this.vdsCmraNo)
                .dtctType(this.dtctType)
                .dtctDir(this.dtctDir)
                .detectLane(this.detectLane)
                .istlLane(this.istlLane)
                .spedClctYn(this.spedClctYn)
                .tfvlClctYn(this.tfvlClctYn)
                .ocpyClctYn(this.ocpyClctYn)
                .maxTfvl(this.maxTfvl)
                .minTfvl(this.minTfvl)
                .maxOcpyRate(this.maxOcpyRate)
                .minOcpyRate(this.minOcpyRate)
                .maxSped(this.maxSped)
                .minSped(this.minSped)
                .useYn(this.useYn)
                .delYn(this.delYn)
                .build();
    }

}
