package entities

type EntityId interface {
	GetId() string
	GetEntityType() EntityType
}

type EntityType int

const (
	TENANT EntityType = iota
	DEVICE
	ALARM
	RULE_CHAIN
	RULE_NODE
)

func (a EntityType) String() string {
	switch a {
	case 0:
		return "TENANT"
	case 1:
		return "DEVICE"
	case 2:
		return "ALARM"
	case 3:
		return "RULE_CHAIN"
	case 4:
		return "RULE_NODE"
	}
	return ""
}

type RuleNodeId struct {
	Id string
}

func (r *RuleNodeId) GetId() string {
	return r.Id
}

func (r *RuleNodeId) GetEntityType() EntityType {
	return RULE_NODE
}

type RuleChainId struct {
	Id string
}

func (r *RuleChainId) GetId() string {
	return r.Id
}

func (r *RuleChainId) GetEntityType() EntityType {
	return RULE_CHAIN
}
