package com.its.vms.dto;

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

    private Long vmsCtlrNmbr;
    private Long vmsIfscId;
    private Integer dsplPrrt;
    private String axisYn;
    private Integer cngstSped;
    private boolean cngstCnfmYn;
    private Integer cngstCnfmSped;

    private boolean isUsed;
    private int cngstCnt;
    private String cngstDt;

    public TbVmsRltnIfsc toEntity() {
        return TbVmsRltnIfsc.builder()
                .vmsCtlrNmbr(this.vmsCtlrNmbr)
                .vmsIfscId(this.vmsIfscId)
                .dsplPrrt(this.dsplPrrt)
                .axisYn(this.axisYn)
                .cngstSped(this.cngstSped)
                .cngstCnfmSped(this.cngstCnfmSped)
                .cngstCnfmYn(this.cngstCnfmYn ? "Y" : "N")
                .build();
    }


}
