001/*
002 *    Copyright 2024-2025, Warm-Flow (290631660@qq.com).
003 *
004 *    Licensed under the Apache License, Version 2.0 (the "License");
005 *    you may not use this file except in compliance with the License.
006 *    You may obtain a copy of the License at
007 *
008 *       https://www.apache.org/licenses/LICENSE-2.0
009 *
010 *    Unless required by applicable law or agreed to in writing, software
011 *    distributed under the License is distributed on an "AS IS" BASIS,
012 *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013 *    See the License for the specific language governing permissions and
014 *    limitations under the License.
015 */
016package org.dromara.warm.flow.core.entity;
017
018import org.dromara.warm.flow.core.FlowFactory;
019
020import java.math.BigDecimal;
021import java.util.Date;
022import java.util.List;
023
024/**
025 * 流程节点对象 flow_node
026 *
027 * @author warm
028 * @since 2023-03-29
029 */
030public interface Node extends RootEntity {
031
032    public Long getId();
033
034    public Node setId(Long id);
035
036    public Date getCreateTime();
037
038    public Node setCreateTime(Date createTime);
039
040    public Date getUpdateTime();
041
042    public Node setUpdateTime(Date updateTime);
043
044    public String getTenantId();
045
046    public Node setTenantId(String tenantId);
047
048    public String getDelFlag();
049
050    public Node setDelFlag(String delFlag);
051
052    public Integer getNodeType();
053
054    public Node setNodeType(Integer nodeType);
055
056    public Long getDefinitionId();
057
058    public Node setDefinitionId(Long definitionId);
059
060    public String getNodeCode();
061
062    public Node setNodeCode(String nodeCode);
063
064    public String getNodeName();
065
066    public Node setNodeName(String nodeName);
067
068    public BigDecimal getNodeRatio();
069
070    public Node setNodeRatio(BigDecimal nodeRatio);
071
072    public List<String> getDynamicPermissionFlagList();
073
074    public Node setDynamicPermissionFlagList(List<String> permissionFlagList);
075
076    public String getPermissionFlag();
077
078    public Node setPermissionFlag(String permissionFlag);
079
080    public String getCoordinate();
081
082    public Node setCoordinate(String coordinate);
083
084    public String getSkipAnyNode();
085
086    public Node setSkipAnyNode(String skipAnyNode);
087
088    String getListenerType();
089
090    Node setListenerType(String listenerType);
091
092    String getListenerPath();
093
094    Node setListenerPath(String listenerPath);
095
096    String getHandlerType();
097
098    Node setHandlerType(String listenerType);
099
100    String getHandlerPath();
101
102    Node setHandlerPath(String listenerPath);
103
104    public String getFormCustom();
105
106    public Node setFormCustom(String formCustom);
107
108    public String getFormPath();
109
110    public Node setFormPath(String formPath);
111
112    public String getVersion();
113
114    public Node setVersion(String version);
115
116    public List<Skip> getSkipList();
117
118    public Node setSkipList(List<Skip> skipList);
119
120    default Node copy() {
121        return FlowFactory.newNode()
122                .setId(this.getId())
123                .setCreateTime(this.getCreateTime())
124                .setUpdateTime(this.getUpdateTime())
125                .setTenantId(this.getTenantId())
126                .setDelFlag(this.getDelFlag())
127                .setNodeType(this.getNodeType())
128                .setDefinitionId(this.getDefinitionId())
129                .setNodeCode(this.getNodeCode())
130                .setNodeName(this.getNodeName())
131                .setNodeRatio(this.getNodeRatio())
132                .setPermissionFlag(this.getPermissionFlag())
133                .setCoordinate(this.getCoordinate())
134                .setVersion(this.getVersion())
135                .setSkipAnyNode(this.getSkipAnyNode())
136                .setListenerType(this.getListenerType())
137                .setListenerPath(this.getListenerPath())
138                .setHandlerType(this.getHandlerType())
139                .setHandlerPath(this.getHandlerPath())
140                .setFormCustom(this.getFormCustom())
141                .setFormPath(this.getFormPath());
142    }
143}