github.com/voedger/voedger@v0.0.0-20240520144910-273e84102129/cmd/vpm/ormtemplates/item.gotmpl (about)

     1  {{define "item"}}
     2  
     3  type {{.Type}}_{{.Package.Name}}_{{.Name}} struct {
     4      Type
     5  }
     6  
     7  {{if and (ne .Type "Command") (ne .Type "Query")}}
     8  type Value_{{.Type}}_{{.Package.Name}}_{{.Name}} struct{
     9      tv exttinygo.TValue
    10  	{{if or (eq .Type "WDoc") (eq .Type "View") (eq .Type "WSingleton")}}kb exttinygo.TKeyBuilder{{end}}
    11  }
    12  {{end}}
    13  
    14  {{if and (ne .Type "Command") (ne .Type "Query")}}
    15  type Intent_{{.Type}}_{{.Package.Name}}_{{.Name}} struct{
    16  	intent exttinygo.TIntent
    17  }
    18  {{end}}
    19  
    20  {{template "fields" .}}
    21  
    22  {{template "methods" .}}
    23  
    24  {{end}}