platform_tiktok_account_info.go 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105
  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. // PlatformTiktokAccountInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type PlatformTiktokAccountInfoDao 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 PlatformTiktokAccountInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // PlatformTiktokAccountInfoColumns defines and stores column names for table platform_tiktok_account_info.
  17. type PlatformTiktokAccountInfoColumns struct {
  18. TiktokId 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. GotLikeCount string // 点赞数
  28. CompositionCount string // 作品数量
  29. TiktokUid string // 抖音uid
  30. IsSupportReporting string // 是否支持报备
  31. IsSupportLive string // 是否支持直播
  32. IsOpenShowcase string // 是否开通商品橱窗
  33. IsAppearInVideo string // 是否出镜
  34. SkilledAt string // 擅长领域(info_tallent_skilled_area表中的id的数组)
  35. HomePageCaptureUrl string // 主页截图图片链接
  36. AccountFrom string // 账号来源(仅B端批量上传的账号需要填写)
  37. SubmitDate string // 提交时间
  38. ExamineFailAdminId string // 审核失败操作管理员id(user表中的id)
  39. ExamineDate string // 审核日期
  40. ExamineFailReason string // 审核失败原因
  41. UpdatedAt string // 更新时间
  42. ExamineSucAdminId string // 审核成功操作管理员id(user表中的id)
  43. }
  44. // platformTiktokAccountInfoColumns holds the columns for table platform_tiktok_account_info.
  45. var platformTiktokAccountInfoColumns = PlatformTiktokAccountInfoColumns{
  46. TiktokId: "tiktok_id",
  47. TalentId: "talent_id",
  48. PlatformId: "platform_id",
  49. PlatformName: "platform_name",
  50. PlatformIconUrl: "platform_icon_url",
  51. PlatformAccountId: "platform_account_id",
  52. PlatformNickname: "platform_nickname",
  53. HomePageUrl: "home_page_url",
  54. FansCount: "fans_count",
  55. GotLikeCount: "got_like_count",
  56. CompositionCount: "composition_count",
  57. TiktokUid: "tiktok_uid",
  58. IsSupportReporting: "is_support_reporting",
  59. IsSupportLive: "is_support_live",
  60. IsOpenShowcase: "is_open_showcase",
  61. IsAppearInVideo: "is_appear_in_video",
  62. SkilledAt: "skilled_at",
  63. HomePageCaptureUrl: "home_page_capture_url",
  64. AccountFrom: "account_from",
  65. SubmitDate: "submit_date",
  66. ExamineFailAdminId: "examine_fail_admin_id",
  67. ExamineDate: "examine_date",
  68. ExamineFailReason: "examine_fail_reason",
  69. UpdatedAt: "updated_at",
  70. ExamineSucAdminId: "examine_suc_admin_id",
  71. }
  72. // NewPlatformTiktokAccountInfoDao creates and returns a new DAO object for table data access.
  73. func NewPlatformTiktokAccountInfoDao() *PlatformTiktokAccountInfoDao {
  74. return &PlatformTiktokAccountInfoDao{
  75. Group: "default",
  76. Table: "platform_tiktok_account_info",
  77. Columns: platformTiktokAccountInfoColumns,
  78. }
  79. }
  80. // DB retrieves and returns the underlying raw database management object of current DAO.
  81. func (dao *PlatformTiktokAccountInfoDao) DB() gdb.DB {
  82. return g.DB(dao.Group)
  83. }
  84. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  85. func (dao *PlatformTiktokAccountInfoDao) Ctx(ctx context.Context) *gdb.Model {
  86. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  87. }
  88. // Transaction wraps the transaction logic using function f.
  89. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  90. // It commits the transaction and returns nil if function f returns nil.
  91. //
  92. // Note that, you should not Commit or Rollback the transaction in function f
  93. // as it is automatically handled by this function.
  94. func (dao *PlatformTiktokAccountInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  95. return dao.Ctx(ctx).Transaction(ctx, f)
  96. }