cloud-etl-task/muyu-quest-common/src/main/java/com/muyu/quest/resp/NodeResp.java

69 lines
1.6 KiB
Java

package com.muyu.quest.resp;
import com.muyu.common.core.annotation.Excel;
import com.muyu.common.core.enums.SysYesNo;
import com.muyu.quest.domain.Node;
import lombok.*;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
/**
* 节点管理对象 node_source
*
* @Author: 胡杨
* @date 2024-08-23
*/
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
public class NodeResp{
/** 自增主键 */
private Long id;
/** 节点编码 */
private String nodeCode;
/** 任务编码 */
private String taskCode;
/** 节点名称 */
private String nodeName;
/** 节点类型 */
private String nodeType;
/** 节点位置Y */
private String nodePositionTop;
/** 节点位置X */
private String nodePositionLeft;
/** 上一级节点 */
private String nodePreCode;
/** 下一级节点 */
private String nodeNextCode;
/** 启用状态 */
private String state;
public static NodeResp build(Node node) {
return NodeResp.builder()
.id(node.getId())
.nodeCode(node.getNodeCode())
.taskCode(node.getTaskCode())
.nodeName(node.getNodeName())
.nodeType(node.getNodeType())
.nodePositionTop(node.getNodePositionTop())
.nodePositionLeft(node.getNodePositionLeft())
.nodePreCode(node.getNodePreCode())
.nodeNextCode(node.getNodeNextCode())
.state(SysYesNo.getInfoByCode(node.getState()))
.build();
}
}