mirror of
https://github.com/hay-kot/homebox.git
synced 2025-06-28 06:38:36 +00:00
refactor: remove empty services (#116)
* remove empty services * remove old factory * remove old static files * cleanup more duplicate service code * file/folder reorg
This commit is contained in:
parent
6529549289
commit
cd82fe0d89
179 changed files with 514 additions and 582 deletions
18
backend/internal/data/ent/schema/templates/has_id.tmpl
Normal file
18
backend/internal/data/ent/schema/templates/has_id.tmpl
Normal file
|
@ -0,0 +1,18 @@
|
|||
{{/* The line below tells Intellij/GoLand to enable the autocompletion based on the *gen.Graph type. */}}
|
||||
{{/* gotype: entgo.io/ent/entc/gen.Graph */}}
|
||||
|
||||
{{ define "has_id" }}
|
||||
|
||||
{{/* Add the base header for the generated file */}}
|
||||
{{ $pkg := base $.Config.Package }}
|
||||
{{ template "header" $ }}
|
||||
import "github.com/google/uuid"
|
||||
{{/* Loop over all nodes and implement the "HasID" interface */}}
|
||||
{{ range $n := $.Nodes }}
|
||||
{{ $receiver := $n.Receiver }}
|
||||
func ({{ $receiver }} *{{ $n.Name }}) GetID() uuid.UUID {
|
||||
return {{ $receiver }}.ID
|
||||
}
|
||||
{{ end }}
|
||||
|
||||
{{ end }}
|
Loading…
Add table
Add a link
Reference in a new issue