r_talent_platform_table.go 3.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  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. // RTalentPlatformTableDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type RTalentPlatformTableDao 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 RTalentPlatformTableColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // RTalentPlatformTableColumns defines and stores column names for table r_talent_platform_table.
  17. type RTalentPlatformTableColumns struct {
  18. RtId string // 审核表的主键ID
  19. Tid string // 达人id(talent_info表中的id)
  20. PId string // 平台id(info_third_platform表中的id)
  21. PName string // 平台名称
  22. PNickname string // 账号所在平台昵称
  23. PAccountId string // 平台对应的ID(达人在所在平台的ID)
  24. FansCount string // 达人在平台的粉丝数量
  25. HomePageUrl string // 达人的主页链接
  26. ExamineState string // 审核状态 1待审核 2审核通过 3审核驳回
  27. FailReason string // 审核驳回原因
  28. ExamineAdminId string // 审核操作管理员id
  29. CreateDate string // 创建时间
  30. ExamineDate string // 审核时间
  31. DisableDate string // 下架时间
  32. Deleted string // 是否逻辑删除 0否 1是
  33. }
  34. // rTalentPlatformTableColumns holds the columns for table r_talent_platform_table.
  35. var rTalentPlatformTableColumns = RTalentPlatformTableColumns{
  36. RtId: "rt_id",
  37. Tid: "tid",
  38. PId: "p_id",
  39. PName: "p_name",
  40. PNickname: "p_nickname",
  41. PAccountId: "p_account_id",
  42. FansCount: "fans_count",
  43. HomePageUrl: "home_page_url",
  44. ExamineState: "examine_state",
  45. FailReason: "fail_reason",
  46. ExamineAdminId: "examine_admin_id",
  47. CreateDate: "create_date",
  48. ExamineDate: "examine_date",
  49. DisableDate: "disable_date",
  50. Deleted: "deleted",
  51. }
  52. // NewRTalentPlatformTableDao creates and returns a new DAO object for table data access.
  53. func NewRTalentPlatformTableDao() *RTalentPlatformTableDao {
  54. return &RTalentPlatformTableDao{
  55. Group: "default",
  56. Table: "r_talent_platform_table",
  57. Columns: rTalentPlatformTableColumns,
  58. }
  59. }
  60. // DB retrieves and returns the underlying raw database management object of current DAO.
  61. func (dao *RTalentPlatformTableDao) DB() gdb.DB {
  62. return g.DB(dao.Group)
  63. }
  64. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  65. func (dao *RTalentPlatformTableDao) Ctx(ctx context.Context) *gdb.Model {
  66. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  67. }
  68. // Transaction wraps the transaction logic using function f.
  69. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  70. // It commits the transaction and returns nil if function f returns nil.
  71. //
  72. // Note that, you should not Commit or Rollback the transaction in function f
  73. // as it is automatically handled by this function.
  74. func (dao *RTalentPlatformTableDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  75. return dao.Ctx(ctx).Transaction(ctx, f)
  76. }