support group edges via scaffold

This commit is contained in:
Hayden 2023-03-05 21:56:53 -09:00
parent 9fa4da819f
commit 737007b156
No known key found for this signature in database
GPG key ID: 17CF79474E257545
4 changed files with 57 additions and 1 deletions

View file

@ -13,6 +13,9 @@ type {{ .Scaffold.model }} struct {
func ({{ .Scaffold.model }}) Mixin() []ent.Mixin {
return []ent.Mixin{
mixins.BaseMixin{},
{{- if .Scaffold.by_group }}
GroupMixin{ref: "{{ snakecase .Scaffold.model }}s"},
{{- end }}
}
}