package com.its.vms.dto;

import com.its.vms.entity.TbVmsSymbIfsc;
import lombok.Builder;
import lombok.Data;

import java.io.Serializable;

/**
 *  DTO Class
 */
@Data
@Builder
public class TbVmsSymbIfscDto implements Serializable {
    private static final long serialVersionUID = 1L;

    private Integer symbLibNmbr;
    private Integer cellId;
    private Integer posX;
    private Integer posY;
    private Long vmsIfscId;
    private String updtDt;

    public TbVmsSymbIfsc toEntity() {
        return TbVmsSymbIfsc.builder()
                .symbLibNmbr(this.symbLibNmbr)
                .cellId(this.cellId)
                .posX(this.posX)
                .posY(this.posY)
                .vmsIfscId(this.vmsIfscId == null ? 0 : this.vmsIfscId)
                .updtDt(this.updtDt)
                .isDup(false)
                .build();
    }

}
