cmd_gen.go 931 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. // Copyright GoFrame gf Author(https://goframe.org). All Rights Reserved.
  2. //
  3. // This Source Code Form is subject to the terms of the MIT License.
  4. // If a copy of the MIT was not distributed with this file,
  5. // You can obtain one at https://github.com/gogf/gf.
  6. package cmd
  7. import (
  8. "github.com/gogf/gf/v2/frame/g"
  9. "github.com/gogf/gf/v2/util/gtag"
  10. )
  11. var (
  12. Gen = cGen{}
  13. )
  14. type cGen struct {
  15. g.Meta `name:"gen" brief:"{cGenBrief}" dc:"{cGenDc}"`
  16. cGenDao
  17. cGenEnums
  18. cGenCtrl
  19. cGenPb
  20. cGenPbEntity
  21. cGenService
  22. }
  23. const (
  24. cGenBrief = `automatically generate go files for dao/do/entity/pb/pbentity`
  25. cGenDc = `
  26. The "gen" command is designed for multiple generating purposes.
  27. It's currently supporting generating go files for ORM models, protobuf and protobuf entity files.
  28. Please use "gf gen dao -h" for specified type help.
  29. `
  30. )
  31. func init() {
  32. gtag.Sets(g.MapStrStr{
  33. `cGenBrief`: cGenBrief,
  34. `cGenDc`: cGenDc,
  35. })
  36. }