Skip to content

Commit

Permalink
define default attributes model
Browse files Browse the repository at this point in the history
  • Loading branch information
calebx committed Dec 27, 2020
1 parent 9e32fb7 commit e99c9d8
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions nested_set.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,20 @@ const (
MoveDirectionInner MoveDirection = 0
)

type nestedItem struct {
// NestedModel includes a list of default attributes
type NestedModel struct {
ID int64
ParentID sql.NullInt64
Depth int
Rgt int
Lft int
ChildrenCount int
TableName string
DbNames map[string]string
}

type nestedItem struct {
NestedModel
TableName string
DbNames map[string]string
}

// parseNode parse a gorm struct into an internal nested item struct
Expand Down

0 comments on commit e99c9d8

Please sign in to comment.