fix(bun): support extra generated model fields

This commit is contained in:
Hermes Agent
2026-07-09 05:50:33 +02:00
parent 7805d9b6f0
commit 47b77763cb
7 changed files with 359 additions and 2 deletions
+7
View File
@@ -23,6 +23,13 @@ type {{.Name}} struct {
{{- range .Fields}}
{{.Name}} {{.Type}} ` + "`bun:\"{{.BunTag}}\" json:\"{{.JSONTag}}\"`" + `{{if .Comment}} // {{.Comment}}{{end}}
{{- end}}
{{- if .ExtraFields}}
// --- Custom fields (managed by relspecgo generator config, issue #4) ---
{{- range .ExtraFields}}
{{.Name}} {{.Type}} ` + "`bun:\"{{.BunTag}}\" json:\"{{.JSONTag}}\"`" + `{{if .Comment}} // {{.Comment}}{{end}}
{{- end}}
{{- end}}
}
{{if .Config.GenerateTableName}}
// TableName returns the table name for {{.Name}}