youngee_platform_account_info.go 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  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. // YoungeePlatformAccountInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type YoungeePlatformAccountInfoDao 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 YoungeePlatformAccountInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // YoungeePlatformAccountInfoColumns defines and stores column names for table youngee_platform_account_info.
  17. type YoungeePlatformAccountInfoColumns struct {
  18. AccountId string //
  19. TalentId string // 达人账号id(youngee_talent_info表id值)
  20. PlatformId string // 平台id,与third_platform_info中的id相同
  21. PlatformNickname string // 在平台上的昵称
  22. PlatformType string // 标签及类型
  23. HomePageUrl string // 主页链接
  24. FansCount string // 粉丝数
  25. HomePageCaptureUrl string // 主页截图链接
  26. BindDate string // 绑定时间
  27. Deleted string // 是否被解绑
  28. UpdatedAt string // 更新时间
  29. UpdatedPerson string // 更新人,0代表本人,1代表管理员
  30. UpdatedAdminId string // 上一次更新的管理员id
  31. }
  32. // youngeePlatformAccountInfoColumns holds the columns for table youngee_platform_account_info.
  33. var youngeePlatformAccountInfoColumns = YoungeePlatformAccountInfoColumns{
  34. AccountId: "account_id",
  35. TalentId: "talent_id",
  36. PlatformId: "platform_id",
  37. PlatformNickname: "platform_nickname",
  38. PlatformType: "platform_type",
  39. HomePageUrl: "home_page_url",
  40. FansCount: "fans_count",
  41. HomePageCaptureUrl: "home_page_capture_url",
  42. BindDate: "bind_date",
  43. Deleted: "deleted",
  44. UpdatedAt: "updated_at",
  45. UpdatedPerson: "updated_person",
  46. UpdatedAdminId: "updated_admin_id",
  47. }
  48. // NewYoungeePlatformAccountInfoDao creates and returns a new DAO object for table data access.
  49. func NewYoungeePlatformAccountInfoDao() *YoungeePlatformAccountInfoDao {
  50. return &YoungeePlatformAccountInfoDao{
  51. Group: "default",
  52. Table: "youngee_platform_account_info",
  53. Columns: youngeePlatformAccountInfoColumns,
  54. }
  55. }
  56. // DB retrieves and returns the underlying raw database management object of current DAO.
  57. func (dao *YoungeePlatformAccountInfoDao) DB() gdb.DB {
  58. return g.DB(dao.Group)
  59. }
  60. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  61. func (dao *YoungeePlatformAccountInfoDao) Ctx(ctx context.Context) *gdb.Model {
  62. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  63. }
  64. // Transaction wraps the transaction logic using function f.
  65. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  66. // It commits the transaction and returns nil if function f returns nil.
  67. //
  68. // Note that, you should not Commit or Rollback the transaction in function f
  69. // as it is automatically handled by this function.
  70. func (dao *YoungeePlatformAccountInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  71. return dao.Ctx(ctx).Transaction(ctx, f)
  72. }