123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687 |
- // ==========================================================================
- // Code generated by GoFrame CLI tool. DO NOT EDIT.
- // ==========================================================================
- package internal
- import (
- "context"
- "github.com/gogf/gf/database/gdb"
- "github.com/gogf/gf/frame/g"
- )
- // YounggeeSketchInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
- type YounggeeSketchInfoDao struct {
- Table string // Table is the underlying table name of the DAO.
- Group string // Group is the database configuration group name of current DAO.
- Columns YounggeeSketchInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
- }
- // YounggeeSketchInfoColumns defines and stores column names for table younggee_sketch_info.
- type YounggeeSketchInfoColumns struct {
- SketchId string // 初稿id
- TaskId string // 任务id
- Title string // 标题
- Type string // 初稿形式,1为图片,2为视频
- Content string // 正文
- ReviseOpinion string // 反馈意见
- IsSubmit string // 是否提交
- IsReview string // 是否审核
- IsOk string // 是否合格
- CreateAt string // 创建时间
- AgreeAt string // 同意时间
- RejectAt string // 驳回时间
- SubmitAt string // 提交时间
- AutoAgreeAt string // 初稿自动审核时间
- AutoLinkBreakAt string // 链接违约自动处理时间
- AutoSketchBreakAt string // 初稿违约自动处理时间
- }
- // younggeeSketchInfoColumns holds the columns for table younggee_sketch_info.
- var younggeeSketchInfoColumns = YounggeeSketchInfoColumns{
- SketchId: "sketch_id",
- TaskId: "task_id",
- Title: "title",
- Type: "type",
- Content: "content",
- ReviseOpinion: "revise_opinion",
- IsSubmit: "is_submit",
- IsReview: "is_review",
- IsOk: "is_ok",
- CreateAt: "create_at",
- AgreeAt: "agree_at",
- RejectAt: "reject_at",
- SubmitAt: "submit_at",
- AutoAgreeAt: "auto_agree_at",
- AutoLinkBreakAt: "auto_link_break_at",
- AutoSketchBreakAt: "auto_sketch_break_at",
- }
- // NewYounggeeSketchInfoDao creates and returns a new DAO object for table data access.
- func NewYounggeeSketchInfoDao() *YounggeeSketchInfoDao {
- return &YounggeeSketchInfoDao{
- Group: "default",
- Table: "younggee_sketch_info",
- Columns: younggeeSketchInfoColumns,
- }
- }
- // DB retrieves and returns the underlying raw database management object of current DAO.
- func (dao *YounggeeSketchInfoDao) DB() gdb.DB {
- return g.DB(dao.Group)
- }
- // Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
- func (dao *YounggeeSketchInfoDao) Ctx(ctx context.Context) *gdb.Model {
- return dao.DB().Model(dao.Table).Safe().Ctx(ctx)
- }
- // Transaction wraps the transaction logic using function f.
- // It rollbacks the transaction and returns the error from function f if it returns non-nil error.
- // It commits the transaction and returns nil if function f returns nil.
- //
- // Note that, you should not Commit or Rollback the transaction in function f
- // as it is automatically handled by this function.
- func (dao *YounggeeSketchInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
- return dao.Ctx(ctx).Transaction(ctx, f)
- }
|