youngee_talent_info.go 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101
  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. TalentWxNickname string // 达人的微信昵称
  21. Income string // 收益总数
  22. Withdrawing string // 提现中金额
  23. Canwithdraw string // 可提现金额
  24. Withdrawed string // 已提现金额
  25. TalentPhoneNumber string // 电话号码
  26. TalentAgeBracket string // 年龄段,取tallent_age_bracket表id
  27. TalentNationality string // 国籍,取tallent_nationality表id
  28. VisitStoreRegion string // 探店区域,取region_info表中的self_code
  29. IsBindInfo string // 是否填写个人资料
  30. IsBindAccount string // 是否绑定账号,1是0否
  31. IsBindLocation string // 是否绑定收货地址
  32. IsBindBank string // 是否绑定银行账户信息
  33. InBlacklist string // 是否加入黑名单 0否 1是
  34. TaskAll string // 任务总数
  35. TaskApply string // 报名任务数量
  36. TaskExecute string // 执行中任务数量
  37. TaskEnd string // 结束任务数量
  38. CreateDate string // 创建时间
  39. LastLoginDate string // 最后登录时间
  40. ApplyNum string // 剩余申请次数(每天更新)
  41. }
  42. // youngeeTalentInfoColumns holds the columns for table youngee_talent_info.
  43. var youngeeTalentInfoColumns = YoungeeTalentInfoColumns{
  44. Id: "id",
  45. TalentWxOpenid: "talent_wx_openid",
  46. TalentWxNickname: "talent_wx_nickname",
  47. Income: "income",
  48. Withdrawing: "withdrawing",
  49. Canwithdraw: "canwithdraw",
  50. Withdrawed: "withdrawed",
  51. TalentPhoneNumber: "talent_phone_number",
  52. TalentAgeBracket: "talent_age_bracket",
  53. TalentNationality: "talent_nationality",
  54. VisitStoreRegion: "visit_store_region",
  55. IsBindInfo: "is_bind_info",
  56. IsBindAccount: "is_bind_account",
  57. IsBindLocation: "is_bind_location",
  58. IsBindBank: "is_bind_bank",
  59. InBlacklist: "in_blacklist",
  60. TaskAll: "task_all",
  61. TaskApply: "task_apply",
  62. TaskExecute: "task_execute",
  63. TaskEnd: "task_end",
  64. CreateDate: "create_date",
  65. LastLoginDate: "last_login_date",
  66. ApplyNum: "apply_num",
  67. }
  68. // NewYoungeeTalentInfoDao creates and returns a new DAO object for table data access.
  69. func NewYoungeeTalentInfoDao() *YoungeeTalentInfoDao {
  70. return &YoungeeTalentInfoDao{
  71. Group: "default",
  72. Table: "youngee_talent_info",
  73. Columns: youngeeTalentInfoColumns,
  74. }
  75. }
  76. // DB retrieves and returns the underlying raw database management object of current DAO.
  77. func (dao *YoungeeTalentInfoDao) DB() gdb.DB {
  78. return g.DB(dao.Group)
  79. }
  80. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  81. func (dao *YoungeeTalentInfoDao) Ctx(ctx context.Context) *gdb.Model {
  82. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  83. }
  84. // Transaction wraps the transaction logic using function f.
  85. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  86. // It commits the transaction and returns nil if function f returns nil.
  87. //
  88. // Note that, you should not Commit or Rollback the transaction in function f
  89. // as it is automatically handled by this function.
  90. func (dao *YoungeeTalentInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  91. return dao.Ctx(ctx).Transaction(ctx, f)
  92. }