sys_dept.go 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  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. // SysDeptDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type SysDeptDao struct {
  12. gmvc.M // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
  13. C sysDeptColumns // 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. // SysDeptColumns defines and stores column names for table sys_dept.
  18. type sysDeptColumns struct {
  19. DeptId string // 部门id
  20. ParentId string // 父部门id
  21. Ancestors string // 祖级列表
  22. DeptName string // 部门名称
  23. OrderNum string // 显示顺序
  24. Leader string // 负责人
  25. Phone string // 联系电话
  26. Email string // 邮箱
  27. Status string // 部门状态(0正常 1停用)
  28. DelFlag string // 删除标志(0代表存在 2代表删除)
  29. CreatedBy string // 创建人
  30. UpdatedBy string // 修改人
  31. CreatedAt string // 创建时间
  32. UpdatedAt string // 修改时间
  33. DeletedAt string // 删除时间
  34. }
  35. // NewSysDeptDao creates and returns a new DAO object for table data access.
  36. func NewSysDeptDao() *SysDeptDao {
  37. columns := sysDeptColumns{
  38. DeptId: "dept_id",
  39. ParentId: "parent_id",
  40. Ancestors: "ancestors",
  41. DeptName: "dept_name",
  42. OrderNum: "order_num",
  43. Leader: "leader",
  44. Phone: "phone",
  45. Email: "email",
  46. Status: "status",
  47. DelFlag: "del_flag",
  48. CreatedBy: "created_by",
  49. UpdatedBy: "updated_by",
  50. CreatedAt: "created_at",
  51. UpdatedAt: "updated_at",
  52. DeletedAt: "deleted_at",
  53. }
  54. return &SysDeptDao{
  55. C: columns,
  56. M: g.DB("default").Model("sys_dept").Safe(),
  57. DB: g.DB("default"),
  58. Table: "sys_dept",
  59. }
  60. }