platform_zhihu_account_info.go 4.4 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. // PlatformZhihuAccountInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type PlatformZhihuAccountInfoDao 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 PlatformZhihuAccountInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // PlatformZhihuAccountInfoColumns defines and stores column names for table platform_zhihu_account_info.
  17. type PlatformZhihuAccountInfoColumns struct {
  18. ZhihuId string //
  19. TalentId string // 达人账号id(talent_info表的id值)
  20. PlatformId string // 平台id,与third_platform_info中的id相同
  21. PlatformName string // 平台名称(冗余)
  22. PlatformIconUrl string // 平台icon的url(冗余)
  23. PlatformAccountId string // 在平台上的账号
  24. PlatformNickname string // 在平台上的昵称
  25. HomePageUrl string // 主页链接
  26. FansCount string // 粉丝数
  27. GotAgreeCount string // 被赞同总数
  28. GotLikeCount string // 被喜欢总数
  29. GotCollectCount string // 被收藏总数
  30. AnswerCount string // 回答总数
  31. CreativeLevel string // 创作等级
  32. TotalReadPlayCount string // 总阅读播放量
  33. HomePageCaptureUrl string // 主页截图
  34. AccountFrom string // 账号来源(仅B端批量上传的账号需要填写)
  35. SubmitDate string // 提交时间
  36. ExamineFailAdminId string // 审核失败操作管理员id(user表中的id)
  37. ExamineDate string // 审核日期
  38. ExamineFailReason string // 审核失败原因
  39. UpdatedAt string // 更新时间
  40. ExamineSucAdminId string // 审核成功操作管理员id(user表中的id)
  41. }
  42. // platformZhihuAccountInfoColumns holds the columns for table platform_zhihu_account_info.
  43. var platformZhihuAccountInfoColumns = PlatformZhihuAccountInfoColumns{
  44. ZhihuId: "zhihu_id",
  45. TalentId: "talent_id",
  46. PlatformId: "platform_id",
  47. PlatformName: "platform_name",
  48. PlatformIconUrl: "platform_icon_url",
  49. PlatformAccountId: "platform_account_id",
  50. PlatformNickname: "platform_nickname",
  51. HomePageUrl: "home_page_url",
  52. FansCount: "fans_count",
  53. GotAgreeCount: "got_agree_count",
  54. GotLikeCount: "got_like_count",
  55. GotCollectCount: "got_collect_count",
  56. AnswerCount: "answer_count",
  57. CreativeLevel: "creative_level",
  58. TotalReadPlayCount: "total_read_play_count",
  59. HomePageCaptureUrl: "home_page_capture_url",
  60. AccountFrom: "account_from",
  61. SubmitDate: "submit_date",
  62. ExamineFailAdminId: "examine_fail_admin_id",
  63. ExamineDate: "examine_date",
  64. ExamineFailReason: "examine_fail_reason",
  65. UpdatedAt: "updated_at",
  66. ExamineSucAdminId: "examine_suc_admin_id",
  67. }
  68. // NewPlatformZhihuAccountInfoDao creates and returns a new DAO object for table data access.
  69. func NewPlatformZhihuAccountInfoDao() *PlatformZhihuAccountInfoDao {
  70. return &PlatformZhihuAccountInfoDao{
  71. Group: "default",
  72. Table: "platform_zhihu_account_info",
  73. Columns: platformZhihuAccountInfoColumns,
  74. }
  75. }
  76. // DB retrieves and returns the underlying raw database management object of current DAO.
  77. func (dao *PlatformZhihuAccountInfoDao) 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 *PlatformZhihuAccountInfoDao) 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 *PlatformZhihuAccountInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  91. return dao.Ctx(ctx).Transaction(ctx, f)
  92. }