package models

import "github.com/jinzhu/gorm"

// Relation 规则节点关系
type Relation struct {
	gorm.Model
	RecordId          string `gorm:"column:record_id;size:32;index"`
	RuleChainId       string `gorm:"column:rule_chain_id;size:32;index;"`
	FromID            string `gorm:"column:from_id;size:32;index"`         // 起始节点ID
	FromType          string `gorm:"column:from_type;size:200;"`           // 起始节点类型
	ToID              string `gorm:"column:to_id;size:32;index"`           // 目标节点Id
	ToType            string `gorm:"column:to_type;size:200"`              // 目标节点类型
	RelationTypeGroup string `gorm:"column:relation_type_group;size:100;"` // 关系类型组
	RelationType      string `gorm:"column:relation_type;size:100;"`       // 关系类型
}
