youngee_talent_info.go 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107
  1. // ==========================================================================
  2. // Code generated by GoFrame CLI tool. DO NOT EDIT.
  3. // ==========================================================================
  4. package internal
  5. import (
  6. "context"
  7. "github.com/gogf/gf/database/gdb"
  8. "github.com/gogf/gf/frame/g"
  9. )
  10. // YoungeeTalentInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type YoungeeTalentInfoDao struct {
  12. Table string // Table is the underlying table name of the DAO.
  13. Group string // Group is the database configuration group name of current DAO.
  14. Columns YoungeeTalentInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // YoungeeTalentInfoColumns defines and stores column names for table youngee_talent_info.
  17. type YoungeeTalentInfoColumns struct {
  18. Id string // 达人id
  19. TalentWxOpenid string // 达人的微信openid
  20. Avatar string //
  21. TalentWxNickname string // 达人的微信昵称
  22. Income string // 收益总数
  23. Withdrawing string // 提现中金额
  24. Canwithdraw string // 可提现金额
  25. Withdrawed string // 已提现金额
  26. Point string // 可用积分
  27. TalentPhoneNumber string // 电话号码
  28. TalentAgeBracket string // 年龄段,取tallent_age_bracket表id
  29. TalentNationality string // 国籍,取tallent_nationality表id
  30. VisitStoreRegion string // 探店区域,取region_info表中的self_code
  31. IsBindInfo string // 是否填写个人资料
  32. IsBindAccount string // 是否绑定账号,1是0否
  33. IsBindLocation string // 是否绑定收货地址
  34. IsBindBank string // 是否绑定银行账户信息
  35. InBlacklist string // 是否加入黑名单 0否 1是
  36. TaskAll string // 任务总数
  37. TaskApply string // 报名任务数量
  38. TaskExecute string // 执行中任务数量
  39. TaskEnd string // 结束任务数量
  40. CreateDate string // 创建时间
  41. LastLoginDate string // 最后登录时间
  42. ApplyNum string // 剩余申请次数(每天更新)
  43. UserType string // 用户类型,1、2分别表示新用户、老用户
  44. }
  45. // youngeeTalentInfoColumns holds the columns for table youngee_talent_info.
  46. var youngeeTalentInfoColumns = YoungeeTalentInfoColumns{
  47. Id: "id",
  48. TalentWxOpenid: "talent_wx_openid",
  49. Avatar: "avatar",
  50. TalentWxNickname: "talent_wx_nickname",
  51. Income: "income",
  52. Withdrawing: "withdrawing",
  53. Canwithdraw: "canwithdraw",
  54. Withdrawed: "withdrawed",
  55. Point: "point",
  56. TalentPhoneNumber: "talent_phone_number",
  57. TalentAgeBracket: "talent_age_bracket",
  58. TalentNationality: "talent_nationality",
  59. VisitStoreRegion: "visit_store_region",
  60. IsBindInfo: "is_bind_info",
  61. IsBindAccount: "is_bind_account",
  62. IsBindLocation: "is_bind_location",
  63. IsBindBank: "is_bind_bank",
  64. InBlacklist: "in_blacklist",
  65. TaskAll: "task_all",
  66. TaskApply: "task_apply",
  67. TaskExecute: "task_execute",
  68. TaskEnd: "task_end",
  69. CreateDate: "create_date",
  70. LastLoginDate: "last_login_date",
  71. ApplyNum: "apply_num",
  72. UserType: "user_type",
  73. }
  74. // NewYoungeeTalentInfoDao creates and returns a new DAO object for table data access.
  75. func NewYoungeeTalentInfoDao() *YoungeeTalentInfoDao {
  76. return &YoungeeTalentInfoDao{
  77. Group: "default",
  78. Table: "youngee_talent_info",
  79. Columns: youngeeTalentInfoColumns,
  80. }
  81. }
  82. // DB retrieves and returns the underlying raw database management object of current DAO.
  83. func (dao *YoungeeTalentInfoDao) DB() gdb.DB {
  84. return g.DB(dao.Group)
  85. }
  86. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  87. func (dao *YoungeeTalentInfoDao) Ctx(ctx context.Context) *gdb.Model {
  88. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  89. }
  90. // Transaction wraps the transaction logic using function f.
  91. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  92. // It commits the transaction and returns nil if function f returns nil.
  93. //
  94. // Note that, you should not Commit or Rollback the transaction in function f
  95. // as it is automatically handled by this function.
  96. func (dao *YoungeeTalentInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  97. return dao.Ctx(ctx).Transaction(ctx, f)
  98. }