package com.icomsys.main_vm.biz.common.login.res;

import com.icomsys.main_vm.db.jpa.entity.system.TbServiceGrouop;
import lombok.*;

import java.time.LocalDateTime;

@Getter
@Setter
@NoArgsConstructor
public class ServiceGroupRes {
    private String serviceGroup;
    private String serviceGroupUpper;
    private String custCode;
    private String serviceType;
    private String serviceGroupName;
    private String serviceGroupDesc;
    private String useYn;
    private String registId;
    private LocalDateTime registDate;
    private String updateId;
    private LocalDateTime updateDate;

    @Builder
    public ServiceGroupRes(String serviceGroup, String serviceGroupUpper, String custCode, String serviceType, String serviceGroupName, String serviceGroupDesc, String useYn, String registId, LocalDateTime registDate, String updateId, LocalDateTime updateDate) {
        this.serviceGroup = serviceGroup;
        this.serviceGroupUpper = serviceGroupUpper;
        this.custCode = custCode;
        this.serviceType = serviceType;
        this.serviceGroupName = serviceGroupName;
        this.serviceGroupDesc = serviceGroupDesc;
        this.useYn = useYn;
        this.registId = registId;
        this.registDate = registDate;
        this.updateId = updateId;
        this.updateDate = updateDate;
    }

    public ServiceGroupRes toServiceGrouopRes(TbServiceGrouop dto) {
        this.serviceGroup = dto.getServiceGroup();
        this.serviceGroupUpper = dto.getServiceGroupUpper();
        this.custCode = dto.getCustCode();
        this.serviceType = dto.getServiceType();
        this.serviceGroupName = dto.getServiceGroupName();
        this.serviceGroupDesc = dto.getServiceGroupDesc();
        this.useYn = dto.getUseYn();
        this.registId = dto.getRegistId();
        this.registDate = dto.getRegistDate();
        this.updateId = dto.getUpdateId();
        this.updateDate = dto.getUpdateDate();
        return this;
    }

}
