younggee_link_info.go 3.3 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. // YounggeeLinkInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type YounggeeLinkInfoDao 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 YounggeeLinkInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // YounggeeLinkInfoColumns defines and stores column names for table younggee_link_info.
  17. type YounggeeLinkInfoColumns struct {
  18. LinkId string // 链接id
  19. TaskId string // 任务id
  20. LinkUrl string // 上传链接url
  21. PhotoUrl string // 上传截图url
  22. ReviseOpinion string // 审核意见
  23. IsSubmit string // 是否提交
  24. IsReview string // 是否审核
  25. IsOk string // 是否合格
  26. CreateAt string // 创建时间
  27. SubmitAt string // 提交时间
  28. AgreeAt string // 同意时间
  29. RejectAt string // 驳回时间
  30. AutoAgreeAt string // 发布审核自动处理时间
  31. AutoDataBreakAt string // 结案违约自动处理时间
  32. AutoLinkBreakAt string // 链接违约自动处理时间
  33. }
  34. // younggeeLinkInfoColumns holds the columns for table younggee_link_info.
  35. var younggeeLinkInfoColumns = YounggeeLinkInfoColumns{
  36. LinkId: "link_id",
  37. TaskId: "task_id",
  38. LinkUrl: "link_url",
  39. PhotoUrl: "photo_url",
  40. ReviseOpinion: "revise_opinion",
  41. IsSubmit: "is_submit",
  42. IsReview: "is_review",
  43. IsOk: "is_ok",
  44. CreateAt: "create_at",
  45. SubmitAt: "submit_at",
  46. AgreeAt: "agree_at",
  47. RejectAt: "reject_at",
  48. AutoAgreeAt: "auto_agree_at",
  49. AutoDataBreakAt: "auto_data_break_at",
  50. AutoLinkBreakAt: "auto_link_break_at",
  51. }
  52. // NewYounggeeLinkInfoDao creates and returns a new DAO object for table data access.
  53. func NewYounggeeLinkInfoDao() *YounggeeLinkInfoDao {
  54. return &YounggeeLinkInfoDao{
  55. Group: "default",
  56. Table: "younggee_link_info",
  57. Columns: younggeeLinkInfoColumns,
  58. }
  59. }
  60. // DB retrieves and returns the underlying raw database management object of current DAO.
  61. func (dao *YounggeeLinkInfoDao) 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 *YounggeeLinkInfoDao) 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 *YounggeeLinkInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  75. return dao.Ctx(ctx).Transaction(ctx, f)
  76. }