Files
ax/models/rel_type.go

25 lines
780 B
Go

package models
type RelType string
type Rel struct {
Type RelType
Target string
}
const (
RelBlocks RelType = "blocks"
RelSubtask RelType = "subtask"
RelRelated RelType = "related"
RelCreated RelType = "created"
RelAssignee RelType = "assignee"
RelInNamespace RelType = "in_namespace"
RelMentions RelType = "mentions"
// Permission rels (subject → object). Levels are inclusive and transitive.
RelCanRead RelType = "can_read" // level 1: visible in list/show
RelCanCreateRel RelType = "can_create_rel" // level 2: can create relations between nodes
RelCanWrite RelType = "can_write" // level 3: can update/delete
RelHasOwnership RelType = "has_ownership" // level 4: sole owner; deletion cascades to owned nodes
)