sys_config.go 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. // SysConfigDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type SysConfigDao struct {
  12. gmvc.M // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
  13. C sysConfigColumns // 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. // SysConfigColumns defines and stores column names for table sys_config.
  18. type sysConfigColumns struct {
  19. ConfigId string // 参数主键
  20. ConfigName string // 参数名称
  21. ConfigKey string // 参数键名
  22. ConfigValue string // 参数键值
  23. ConfigType string // 系统内置(Y是 N否)
  24. CreateBy string // 创建者
  25. UpdateBy string // 更新者
  26. Remark string // 备注
  27. CreatedAt string // 创建时间
  28. UpdatedAt string // 修改时间
  29. DeletedAt string // 删除时间
  30. }
  31. // NewSysConfigDao creates and returns a new DAO object for table data access.
  32. func NewSysConfigDao() *SysConfigDao {
  33. columns := sysConfigColumns{
  34. ConfigId: "config_id",
  35. ConfigName: "config_name",
  36. ConfigKey: "config_key",
  37. ConfigValue: "config_value",
  38. ConfigType: "config_type",
  39. CreateBy: "create_by",
  40. UpdateBy: "update_by",
  41. Remark: "remark",
  42. CreatedAt: "created_at",
  43. UpdatedAt: "updated_at",
  44. DeletedAt: "deleted_at",
  45. }
  46. return &SysConfigDao{
  47. C: columns,
  48. M: g.DB("default").Model("sys_config").Safe(),
  49. DB: g.DB("default"),
  50. Table: "sys_config",
  51. }
  52. }