tools_gen_table.go 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // ==========================================================================
  2. // Code generated by GoFrame CLI tool. DO NOT EDIT.
  3. // ==========================================================================
  4. package internal
  5. import (
  6. "github.com/gogf/gf/database/gdb"
  7. "github.com/gogf/gf/frame/g"
  8. "github.com/gogf/gf/frame/gmvc"
  9. )
  10. // ToolsGenTableDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type ToolsGenTableDao struct {
  12. gmvc.M // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
  13. C toolsGenTableColumns // C is the short type for Columns, which contains all the column names of Table for convenient usage.
  14. DB gdb.DB // DB is the raw underlying database management object.
  15. Table string // Table is the underlying table name of the DAO.
  16. }
  17. // ToolsGenTableColumns defines and stores column names for table tools_gen_table.
  18. type toolsGenTableColumns struct {
  19. TableId string // 编号
  20. TableName string // 表名称
  21. TableComment string // 表描述
  22. ClassName string // 实体类名称
  23. TplCategory string // 使用的模板(crud单表操作 tree树表操作)
  24. PackageName string // 生成包路径
  25. ModuleName string // 生成模块名
  26. BusinessName string // 生成业务名
  27. FunctionName string // 生成功能名
  28. FunctionAuthor string // 生成功能作者
  29. Options string // 其它生成选项
  30. CreateTime string // 创建时间
  31. UpdateTime string // 更新时间
  32. Remark string // 备注
  33. }
  34. // NewToolsGenTableDao creates and returns a new DAO object for table data access.
  35. func NewToolsGenTableDao() *ToolsGenTableDao {
  36. columns := toolsGenTableColumns{
  37. TableId: "table_id",
  38. TableName: "table_name",
  39. TableComment: "table_comment",
  40. ClassName: "class_name",
  41. TplCategory: "tpl_category",
  42. PackageName: "package_name",
  43. ModuleName: "module_name",
  44. BusinessName: "business_name",
  45. FunctionName: "function_name",
  46. FunctionAuthor: "function_author",
  47. Options: "options",
  48. CreateTime: "create_time",
  49. UpdateTime: "update_time",
  50. Remark: "remark",
  51. }
  52. return &ToolsGenTableDao{
  53. C: columns,
  54. M: g.DB("default").Model("tools_gen_table").Safe(),
  55. DB: g.DB("default"),
  56. Table: "tools_gen_table",
  57. }
  58. }