youngee_platform_account_info.go 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. HomePageUrl string // 主页链接
  23. FansCount string // 粉丝数
  24. HomePageCaptureUrl string // 主页截图链接
  25. BindDate string // 绑定时间
  26. Deleted string // 是否被解绑
  27. UpdatedAt string // 更新时间
  28. UpdatedPerson string // 更新人,0代表本人,1代表管理员
  29. UpdatedAdminId string // 上一次更新的管理员id
  30. }
  31. // youngeePlatformAccountInfoColumns holds the columns for table youngee_platform_account_info.
  32. var youngeePlatformAccountInfoColumns = YoungeePlatformAccountInfoColumns{
  33. AccountId: "account_id",
  34. TalentId: "talent_id",
  35. PlatformId: "platform_id",
  36. PlatformNickname: "platform_nickname",
  37. HomePageUrl: "home_page_url",
  38. FansCount: "fans_count",
  39. HomePageCaptureUrl: "home_page_capture_url",
  40. BindDate: "bind_date",
  41. Deleted: "deleted",
  42. UpdatedAt: "updated_at",
  43. UpdatedPerson: "updated_person",
  44. UpdatedAdminId: "updated_admin_id",
  45. }
  46. // NewYoungeePlatformAccountInfoDao creates and returns a new DAO object for table data access.
  47. func NewYoungeePlatformAccountInfoDao() *YoungeePlatformAccountInfoDao {
  48. return &YoungeePlatformAccountInfoDao{
  49. Group: "default",
  50. Table: "youngee_platform_account_info",
  51. Columns: youngeePlatformAccountInfoColumns,
  52. }
  53. }
  54. // DB retrieves and returns the underlying raw database management object of current DAO.
  55. func (dao *YoungeePlatformAccountInfoDao) DB() gdb.DB {
  56. return g.DB(dao.Group)
  57. }
  58. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  59. func (dao *YoungeePlatformAccountInfoDao) Ctx(ctx context.Context) *gdb.Model {
  60. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  61. }
  62. // Transaction wraps the transaction logic using function f.
  63. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  64. // It commits the transaction and returns nil if function f returns nil.
  65. //
  66. // Note that, you should not Commit or Rollback the transaction in function f
  67. // as it is automatically handled by this function.
  68. func (dao *YoungeePlatformAccountInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  69. return dao.Ctx(ctx).Transaction(ctx, f)
  70. }