fix(bun): support extra generated model fields
This commit is contained in:
@@ -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}}
|
||||
|
||||
Reference in New Issue
Block a user