package com.icomsys.main_vm.biz.rcp.conversation.vo;

import lombok.Builder;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * Name : ConversationApiNodeEditRes date : 2023-02-07 author :  Mong description : =========================================================== DATE                 AUTHOR                NOTE
 * ----------------------------------------------------------- 2023-02-07                Mong             최초 생성
 */

@Getter
@Setter
@NoArgsConstructor
public class ConversationApiNodeInfoRes {

    private Long seq;
    private String nodeName;
    private String updateId;
    private LocalDateTime updateDate;
    private String oprMngCode;
    private String serviceGroupName;

    @Builder
    public ConversationApiNodeInfoRes(Long seq, String nodeName, String updateId, LocalDateTime updateDate, String oprMngCode, String serviceGroupName) {
        this.seq = seq;
        this.nodeName = nodeName;
        this.updateId = updateId;
        this.updateDate = updateDate;
        this.oprMngCode = oprMngCode;
        this.serviceGroupName = serviceGroupName;
    }

    public String getUpdateDate() {
        return updateDate.format(DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm"));
    }
    public void setUpdateDate(LocalDateTime updateDate) {
        this.updateDate = updateDate;
    }
}
