package com.icomsys.main_vm.biz.rcp.oprManage.dto;

import com.icomsys.main_vm.db.jpa.entity.oprManage.TbBgmMng;
import lombok.Builder;
import lombok.Getter;
import lombok.RequiredArgsConstructor;
import lombok.Setter;

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

@Getter
@Setter
@RequiredArgsConstructor
public class BgmDto implements Serializable {
    private String fileName;
    private String filePath;
    private String custCode;
    private String registId;
    private String registDate;

    private List<BgmDto> bgmDtoList;


    @Builder
    public BgmDto(String fileName, String filePath, String custCode, String registId, String registDate) {
        this.fileName = fileName;
        this.filePath = filePath;
        this.custCode = custCode;
        this.registId = registId;
        this.registDate = registDate;
    }

    public TbBgmMng toEntity() {
        return TbBgmMng.builder()
                .fileName(fileName)
                .filePath(filePath)
                .custCode(custCode)
                .registId(registId)
                .build();
    }
}