package cn.stylefeng.workflow.api.entity.design;

import cn.stylefeng.roses.kernel.db.api.pojo.entity.BaseEntity;
import cn.stylefeng.roses.kernel.rule.annotation.ChineseDescription;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.EqualsAndHashCode;

@TableName("flow_design_node_edge")
@Data
@EqualsAndHashCode(callSuper = true)
public class NodeEdge extends BaseEntity {

    @TableId(value = "edge_id", type = IdType.ASSIGN_ID)
    @ChineseDescription("主键")
    private Long edgeId;

    @TableField("model_id")
    @ChineseDescription("流程模型id")
    private Long modelId;

    @TableField("definition_id")
    @ChineseDescription("流程定义id")
    private Long definitionId;

    @TableField("source_node_id")
    @ChineseDescription("起点节点")
    private Long sourceNodeId;

    @TableField("target_node_id")
    @ChineseDescription("结束节点")
    private Long targetNodeId;

    @TableField(value = "version_flag", fill = FieldFill.INSERT)
    @ChineseDescription("乐观锁")
    @Version
    private Long versionFlag;

    @TableField(value = "tenant_id", fill = FieldFill.INSERT)
    @ChineseDescription("租户号")
    private Long tenantId;

}
