platform_dianping_account_info.go 4.4 KB

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