12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485 |
- // ==========================================================================
- // 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"
- )
- // YounggeeLinkInfoDao is the manager for logic model data accessing and custom defined data operations functions management.
- type YounggeeLinkInfoDao 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 YounggeeLinkInfoColumns // Columns is the short type for Columns, which contains all the column names of Table for convenient usage.
- }
- // YounggeeLinkInfoColumns defines and stores column names for table younggee_link_info.
- type YounggeeLinkInfoColumns struct {
- LinkId string // 链接id
- TaskId string // 任务id
- LinkUrl string // 上传链接url
- PhotoUrl string // 上传截图url
- ReviseOpinion string // 审核意见
- IsSubmit string // 是否提交
- IsReview string // 是否审核
- IsOk string // 是否合格
- CreateAt string // 创建时间
- SubmitAt string // 提交时间
- AgreeAt string // 同意时间
- RejectAt string // 驳回时间
- AutoAgreeAt string // 发布审核自动处理时间
- AutoDataBreakAt string // 结案违约自动处理时间
- AutoLinkBreakAt string // 链接违约自动处理时间
- }
- // younggeeLinkInfoColumns holds the columns for table younggee_link_info.
- var younggeeLinkInfoColumns = YounggeeLinkInfoColumns{
- LinkId: "link_id",
- TaskId: "task_id",
- LinkUrl: "link_url",
- PhotoUrl: "photo_url",
- ReviseOpinion: "revise_opinion",
- IsSubmit: "is_submit",
- IsReview: "is_review",
- IsOk: "is_ok",
- CreateAt: "create_at",
- SubmitAt: "submit_at",
- AgreeAt: "agree_at",
- RejectAt: "reject_at",
- AutoAgreeAt: "auto_agree_at",
- AutoDataBreakAt: "auto_data_break_at",
- AutoLinkBreakAt: "auto_link_break_at",
- }
- // NewYounggeeLinkInfoDao creates and returns a new DAO object for table data access.
- func NewYounggeeLinkInfoDao() *YounggeeLinkInfoDao {
- return &YounggeeLinkInfoDao{
- Group: "default",
- Table: "younggee_link_info",
- Columns: younggeeLinkInfoColumns,
- }
- }
- // DB retrieves and returns the underlying raw database management object of current DAO.
- func (dao *YounggeeLinkInfoDao) 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 *YounggeeLinkInfoDao) 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 *YounggeeLinkInfoDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
- return dao.Ctx(ctx).Transaction(ctx, f)
- }
|