package com.its.vms.entity;

import com.its.vms.dto.TbVmsSymbIfscDto;
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 TbVmsSymbIfsc 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 TbVmsSymbIfscDto toDto() {
        return TbVmsSymbIfscDto.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)
                .isValid(true)
                .build();
    }

}
