younggee_sketch_info.go 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  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. // YounggeeSketchInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
  11. type YounggeeSketchInfoDao 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 YounggeeSketchInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
  15. }
  16. // YounggeeSketchInfoColumns defines and stores column names for table younggee_sketch_info.
  17. type YounggeeSketchInfoColumns struct {
  18. SketchId string // 初稿id
  19. TaskId string // 任务id
  20. Title string // 标题
  21. Type string // 初稿形式,1为图片,2为视频
  22. Content string // 正文
  23. ReviseOpinion string // 反馈意见
  24. IsSubmit string // 是否提交
  25. IsReview string // 是否审核
  26. IsOk string // 是否合格
  27. CreateAt string // 创建时间
  28. AgreeAt string // 同意时间
  29. RejectAt string // 驳回时间
  30. SubmitAt string // 提交时间
  31. AutoAgreeAt string // 初稿自动审核时间
  32. AutoLinkBreakAt string // 链接违约自动处理时间
  33. AutoSketchBreakAt string // 初稿违约自动处理时间
  34. }
  35. // younggeeSketchInfoColumns holds the columns for table younggee_sketch_info.
  36. var younggeeSketchInfoColumns = YounggeeSketchInfoColumns{
  37. SketchId: "sketch_id",
  38. TaskId: "task_id",
  39. Title: "title",
  40. Type: "type",
  41. Content: "content",
  42. ReviseOpinion: "revise_opinion",
  43. IsSubmit: "is_submit",
  44. IsReview: "is_review",
  45. IsOk: "is_ok",
  46. CreateAt: "create_at",
  47. AgreeAt: "agree_at",
  48. RejectAt: "reject_at",
  49. SubmitAt: "submit_at",
  50. AutoAgreeAt: "auto_agree_at",
  51. AutoLinkBreakAt: "auto_link_break_at",
  52. AutoSketchBreakAt: "auto_sketch_break_at",
  53. }
  54. // NewYounggeeSketchInfoDao creates and returns a new DAO object for table data access.
  55. func NewYounggeeSketchInfoDao() *YounggeeSketchInfoDao {
  56. return &YounggeeSketchInfoDao{
  57. Group: "default",
  58. Table: "younggee_sketch_info",
  59. Columns: younggeeSketchInfoColumns,
  60. }
  61. }
  62. // DB retrieves and returns the underlying raw database management object of current DAO.
  63. func (dao *YounggeeSketchInfoDao) DB() gdb.DB {
  64. return g.DB(dao.Group)
  65. }
  66. // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
  67. func (dao *YounggeeSketchInfoDao) Ctx(ctx context.Context) *gdb.Model {
  68. return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
  69. }
  70. // Transaction wraps the transaction logic using function f.
  71. // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
  72. // It commits the transaction and returns nil if function f returns nil.
  73. //
  74. // Note that, you should not Commit or Rollback the transaction in function f
  75. // as it is automatically handled by this function.
  76. func (dao *YounggeeSketchInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
  77. return dao.Ctx(ctx).Transaction(ctx, f)
  78. }