1 Star 1 Fork 0

linngc / center.gf

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
sys_appid_log.go 2.92 KB
一键复制 编辑 原始数据 按行查看 历史
linngc 提交于 2023-08-18 11:37 . add:添加新表实体
// ==========================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2023-08-18 11:31:56
// ==========================================================================
package internal
import (
"context"
"github.com/gogf/gf/v2/database/gdb"
"github.com/gogf/gf/v2/frame/g"
)
// SysAppidLogDao is the data access object for table sys_appid_log.
type SysAppidLogDao 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 SysAppidLogColumns // columns contains all the column names of Table for convenient usage.
}
// SysAppidLogColumns defines and stores column names for table sys_appid_log.
type SysAppidLogColumns struct {
Id string //
Name string //
Method string //
Api string //
Ip string //
Userid string //
Available string //
IsDefault string //
Remark string //
CreateTime string //
DelFlag string //
}
// sysAppidLogColumns holds the columns for table sys_appid_log.
var sysAppidLogColumns = SysAppidLogColumns{
Id: "id",
Name: "name",
Method: "method",
Api: "api",
Ip: "ip",
Userid: "userid",
Available: "available",
IsDefault: "is_default",
Remark: "remark",
CreateTime: "create_time",
DelFlag: "del_flag",
}
// NewSysAppidLogDao creates and returns a new DAO object for table data access.
func NewSysAppidLogDao() *SysAppidLogDao {
return &SysAppidLogDao{
group: "default",
table: "sys_appid_log",
columns: sysAppidLogColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *SysAppidLogDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *SysAppidLogDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *SysAppidLogDao) Columns() SysAppidLogColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *SysAppidLogDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *SysAppidLogDao) 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 *SysAppidLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/linngc/center.gf.git
git@gitee.com:linngc/center.gf.git
linngc
center.gf
center.gf
v0.2.12

搜索帮助

344bd9b3 5694891 D2dac590 5694891