diff options
Diffstat (limited to 'models/node.go')
-rw-r--r-- | models/node.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/models/node.go b/models/node.go index 16e426a..98a8d4e 100644 --- a/models/node.go +++ b/models/node.go @@ -21,6 +21,7 @@ type Node struct { CreatedAt int64 `bun:",nullzero,notnull,default:current_timestamp"` UpdatedAt int64 `bun:",nullzero,notnull,default:current_timestamp"` DeletedAt int64 + Children []*Node `bun:"rel:has-many,join:id=parent_id"` } var _ bun.BeforeAppendModelHook = (*Node)(nil) |