tools_gen_table_column.go 3.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  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. // ToolsGenTableColumnDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type ToolsGenTableColumnDao struct {
  12. gmvc.M // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
  13. C toolsGenTableColumnColumns // 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. // ToolsGenTableColumnColumns defines and stores column names for table tools_gen_table_column.
  18. type toolsGenTableColumnColumns struct {
  19. ColumnId string // 编号
  20. TableId string // 归属表编号
  21. ColumnName string // 列名称
  22. ColumnComment string // 列描述
  23. ColumnType string // 列类型
  24. GoType string // Go类型
  25. GoField string // Go字段名
  26. HtmlField string // html字段名
  27. IsPk string // 是否主键(1是)
  28. IsIncrement string // 是否自增(1是)
  29. IsRequired string // 是否必填(1是)
  30. IsInsert string // 是否为插入字段(1是)
  31. IsEdit string // 是否编辑字段(1是)
  32. IsList string // 是否列表字段(1是)
  33. IsQuery string // 是否查询字段(1是)
  34. QueryType string // 查询方式(等于、不等于、大于、小于、范围)
  35. HtmlType string // 显示类型(文本框、文本域、下拉框、复选框、单选框、日期控件)
  36. DictType string // 字典类型
  37. Sort string // 排序
  38. LinkTableName string // 关联表名
  39. LinkTableClass string // 关联表类名
  40. LinkTablePackage string // 关联表包名
  41. LinkLabelId string // 关联表键名
  42. LinkLabelName string // 关联表字段值
  43. }
  44. // NewToolsGenTableColumnDao creates and returns a new DAO object for table data access.
  45. func NewToolsGenTableColumnDao() *ToolsGenTableColumnDao {
  46. columns := toolsGenTableColumnColumns{
  47. ColumnId: "column_id",
  48. TableId: "table_id",
  49. ColumnName: "column_name",
  50. ColumnComment: "column_comment",
  51. ColumnType: "column_type",
  52. GoType: "go_type",
  53. GoField: "go_field",
  54. HtmlField: "html_field",
  55. IsPk: "is_pk",
  56. IsIncrement: "is_increment",
  57. IsRequired: "is_required",
  58. IsInsert: "is_insert",
  59. IsEdit: "is_edit",
  60. IsList: "is_list",
  61. IsQuery: "is_query",
  62. QueryType: "query_type",
  63. HtmlType: "html_type",
  64. DictType: "dict_type",
  65. Sort: "sort",
  66. LinkTableName: "link_table_name",
  67. LinkTableClass: "link_table_class",
  68. LinkTablePackage: "link_table_package",
  69. LinkLabelId: "link_label_id",
  70. LinkLabelName: "link_label_name",
  71. }
  72. return &ToolsGenTableColumnDao{
  73. C: columns,
  74. M: g.DB("default").Model("tools_gen_table_column").Safe(),
  75. DB: g.DB("default"),
  76. Table: "tools_gen_table_column",
  77. }
  78. }