package com.its.vms.dto;

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

import java.io.Serializable;
import java.util.List;

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

    private Integer vmsFormId;
    private String vmsTypeCd;
    private Integer vmsFormTypeCd;
    private Integer vmsFormColrCd;
    private String vmsFormNm;
    private String vmsFormExpl;
    private Integer vmsFormDsplDrctCd;
    private Integer symbLibNmbr;
    private byte[] vmsFormImag;
    private Integer vmsFormDsplMthdCd;
    private Long cctvMngmNmbr;
    private String updtDt;
    private String validYn;

    private String localFileName;
    private String ftpFileName;
    private String trfBackImgId;

    private boolean isBottomTrfIfsc;    // 도형식 하단 정보제공구간소통정보
    private boolean isBottomTrfAxis;    // 도형식 하단 축소통정보
    private boolean isBottomFixedText;  // 도형식 하단에 소통정보가 없을 경우 기본문자 표출여부, 20200515 추가함
    private boolean isNewForm;          // 신규이거나 변경된 경우 true

    private List<TbVmsFormObjectDto> objects;

    public TbVmsForm toEntity() {
        return TbVmsForm.builder()
                .vmsFormId(this.vmsFormId)
                .vmsTypeCd(this.vmsTypeCd)
                .vmsFormTypeCd(this.vmsFormTypeCd)
                .vmsFormColrCd(this.vmsFormColrCd)
                .vmsFormNm(this.vmsFormNm)
                .vmsFormExpl(this.vmsFormExpl)
                .vmsFormDsplDrctCd(this.vmsFormDsplDrctCd)
                .symbLibNmbr(this.symbLibNmbr)
                .vmsFormImag(this.vmsFormImag)
                .vmsFormDsplMthdCd(this.vmsFormDsplMthdCd)
                .cctvMngmNmbr(this.cctvMngmNmbr)
                .updtDt(this.updtDt)
                .validYn(this.validYn)
                .build();
    }

}
