platform_bilibili_account_info.go 4.4 KB

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