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

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_engine_runtime_node_edge")
@Data
@EqualsAndHashCode(callSuper = true)
public class RuntimeNodeEdge extends BaseEntity {

    @TableId(value = "ru_node_edge_id", type = IdType.ASSIGN_ID)
    @ChineseDescription("主键id")
    private Long ruNodeEdgeId;

    @TableField("instance_id")
    @ChineseDescription("流程运行实例id")
    private Long instanceId;

    @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;

}
