sys_post.go 1.9 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. // SysPostDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type SysPostDao struct {
  12. gmvc.M // M is the core and embedded struct that inherits all chaining operations from gdb.Model.
  13. C sysPostColumns // 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. // SysPostColumns defines and stores column names for table sys_post.
  18. type sysPostColumns struct {
  19. PostId string // 岗位ID
  20. PostCode string // 岗位编码
  21. PostName string // 岗位名称
  22. PostSort string // 显示顺序
  23. Status string // 状态(0正常 1停用)
  24. Remark string // 备注
  25. CreatedBy string // 创建人
  26. UpdatedBy string // 修改人
  27. CreatedAt string // 创建时间
  28. UpdatedAt string // 修改时间
  29. DeletedAt string // 删除时间
  30. }
  31. // NewSysPostDao creates and returns a new DAO object for table data access.
  32. func NewSysPostDao() *SysPostDao {
  33. columns := sysPostColumns{
  34. PostId: "post_id",
  35. PostCode: "post_code",
  36. PostName: "post_name",
  37. PostSort: "post_sort",
  38. Status: "status",
  39. Remark: "remark",
  40. CreatedBy: "created_by",
  41. UpdatedBy: "updated_by",
  42. CreatedAt: "created_at",
  43. UpdatedAt: "updated_at",
  44. DeletedAt: "deleted_at",
  45. }
  46. return &SysPostDao{
  47. C: columns,
  48. M: g.DB("default").Model("sys_post").Safe(),
  49. DB: g.DB("default"),
  50. Table: "sys_post",
  51. }
  52. }