platform_weibo_account_info.go 4.5 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. // PlatformWeiboAccountInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type PlatformWeiboAccountInfoDao 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 PlatformWeiboAccountInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // PlatformWeiboAccountInfoColumns defines and stores column names for table platform_weibo_account_info.
  17. type PlatformWeiboAccountInfoColumns struct {
  18. WeiboId 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. WeiboTotalNum string // 微博总量
  28. IsSupportReporting string // 是否支持报备
  29. IsSupportLive string // 是否支持直播
  30. CanMakeVideo string // 是否可以制作视频
  31. IsAppearInVideo string // 是否出镜
  32. SkilledAt string // 擅长领域(info_tallent_skilled_area表中的id的数组)
  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. // platformWeiboAccountInfoColumns holds the columns for table platform_weibo_account_info.
  43. var platformWeiboAccountInfoColumns = PlatformWeiboAccountInfoColumns{
  44. WeiboId: "weibo_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. WeiboTotalNum: "weibo_total_num",
  54. IsSupportReporting: "is_support_reporting",
  55. IsSupportLive: "is_support_live",
  56. CanMakeVideo: "can_make_video",
  57. IsAppearInVideo: "is_appear_in_video",
  58. SkilledAt: "skilled_at",
  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. // NewPlatformWeiboAccountInfoDao creates and returns a new DAO object for table data access.
  69. func NewPlatformWeiboAccountInfoDao() *PlatformWeiboAccountInfoDao {
  70. return &PlatformWeiboAccountInfoDao{
  71. Group: "default",
  72. Table: "platform_weibo_account_info",
  73. Columns: platformWeiboAccountInfoColumns,
  74. }
  75. }
  76. // DB retrieves and returns the underlying raw database management object of current DAO.
  77. func (dao *PlatformWeiboAccountInfoDao) 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 *PlatformWeiboAccountInfoDao) 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 *PlatformWeiboAccountInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  91. return dao.Ctx(ctx).Transaction(ctx, f)
  92. }