初始
This commit is contained in:
24
internal/app/common/dao/casbin_rule.go
Normal file
24
internal/app/common/dao/casbin_rule.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"github.com/tiger1103/gfast/v3/internal/app/common/dao/internal"
|
||||
)
|
||||
|
||||
// casbinRuleDao is the data access object for table casbin_rule.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
type casbinRuleDao struct {
|
||||
*internal.CasbinRuleDao
|
||||
}
|
||||
|
||||
var (
|
||||
// CasbinRule is globally public accessible object for table casbin_rule operations.
|
||||
CasbinRule = casbinRuleDao{
|
||||
internal.NewCasbinRuleDao(),
|
||||
}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
84
internal/app/common/dao/internal/casbin_rule.go
Normal file
84
internal/app/common/dao/internal/casbin_rule.go
Normal file
@ -0,0 +1,84 @@
|
||||
// ==========================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT.
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// CasbinRuleDao is the data access object for table casbin_rule.
|
||||
type CasbinRuleDao 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 CasbinRuleColumns // columns contains all the column names of Table for convenient usage.
|
||||
}
|
||||
|
||||
// CasbinRuleColumns defines and stores column names for table casbin_rule.
|
||||
type CasbinRuleColumns struct {
|
||||
Ptype string //
|
||||
V0 string //
|
||||
V1 string //
|
||||
V2 string //
|
||||
V3 string //
|
||||
V4 string //
|
||||
V5 string //
|
||||
}
|
||||
|
||||
// casbinRuleColumns holds the columns for table casbin_rule.
|
||||
var casbinRuleColumns = CasbinRuleColumns{
|
||||
Ptype: "ptype",
|
||||
V0: "v0",
|
||||
V1: "v1",
|
||||
V2: "v2",
|
||||
V3: "v3",
|
||||
V4: "v4",
|
||||
V5: "v5",
|
||||
}
|
||||
|
||||
// NewCasbinRuleDao creates and returns a new DAO object for table data access.
|
||||
func NewCasbinRuleDao() *CasbinRuleDao {
|
||||
return &CasbinRuleDao{
|
||||
group: "default",
|
||||
table: "casbin_rule",
|
||||
columns: casbinRuleColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
func (dao *CasbinRuleDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of current dao.
|
||||
func (dao *CasbinRuleDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of current dao.
|
||||
func (dao *CasbinRuleDao) Columns() CasbinRuleColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the configuration group name of database of current dao.
|
||||
func (dao *CasbinRuleDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
func (dao *CasbinRuleDao) 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 *CasbinRuleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
90
internal/app/common/dao/internal/sys_config.go
Normal file
90
internal/app/common/dao/internal/sys_config.go
Normal file
@ -0,0 +1,90 @@
|
||||
// ==========================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-04-18 21:09:17
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysConfigDao is the data access object for table sys_config.
|
||||
type SysConfigDao 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 SysConfigColumns // columns contains all the column names of Table for convenient usage.
|
||||
}
|
||||
|
||||
// SysConfigColumns defines and stores column names for table sys_config.
|
||||
type SysConfigColumns struct {
|
||||
ConfigId string // 参数主键
|
||||
ConfigName string // 参数名称
|
||||
ConfigKey string // 参数键名
|
||||
ConfigValue string // 参数键值
|
||||
ConfigType string // 系统内置(Y是 N否)
|
||||
CreateBy string // 创建者
|
||||
UpdateBy string // 更新者
|
||||
Remark string // 备注
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// sysConfigColumns holds the columns for table sys_config.
|
||||
var sysConfigColumns = SysConfigColumns{
|
||||
ConfigId: "config_id",
|
||||
ConfigName: "config_name",
|
||||
ConfigKey: "config_key",
|
||||
ConfigValue: "config_value",
|
||||
ConfigType: "config_type",
|
||||
CreateBy: "create_by",
|
||||
UpdateBy: "update_by",
|
||||
Remark: "remark",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysConfigDao creates and returns a new DAO object for table data access.
|
||||
func NewSysConfigDao() *SysConfigDao {
|
||||
return &SysConfigDao{
|
||||
group: "default",
|
||||
table: "sys_config",
|
||||
columns: sysConfigColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
func (dao *SysConfigDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of current dao.
|
||||
func (dao *SysConfigDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of current dao.
|
||||
func (dao *SysConfigDao) Columns() SysConfigColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the configuration group name of database of current dao.
|
||||
func (dao *SysConfigDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
func (dao *SysConfigDao) 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 *SysConfigDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
98
internal/app/common/dao/internal/sys_dict_data.go
Normal file
98
internal/app/common/dao/internal/sys_dict_data.go
Normal file
@ -0,0 +1,98 @@
|
||||
// ==========================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-04-16 16:32:52
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysDictDataDao is the data access object for table sys_dict_data.
|
||||
type SysDictDataDao 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 SysDictDataColumns // columns contains all the column names of Table for convenient usage.
|
||||
}
|
||||
|
||||
// SysDictDataColumns defines and stores column names for table sys_dict_data.
|
||||
type SysDictDataColumns struct {
|
||||
DictCode string // 字典编码
|
||||
DictSort string // 字典排序
|
||||
DictLabel string // 字典标签
|
||||
DictValue string // 字典键值
|
||||
DictType string // 字典类型
|
||||
CssClass string // 样式属性(其他样式扩展)
|
||||
ListClass string // 表格回显样式
|
||||
IsDefault string // 是否默认(1是 0否)
|
||||
Status string // 状态(0正常 1停用)
|
||||
CreateBy string // 创建者
|
||||
UpdateBy string // 更新者
|
||||
Remark string // 备注
|
||||
CreatedAt string // 创建时间
|
||||
UpdatedAt string // 修改时间
|
||||
}
|
||||
|
||||
// sysDictDataColumns holds the columns for table sys_dict_data.
|
||||
var sysDictDataColumns = SysDictDataColumns{
|
||||
DictCode: "dict_code",
|
||||
DictSort: "dict_sort",
|
||||
DictLabel: "dict_label",
|
||||
DictValue: "dict_value",
|
||||
DictType: "dict_type",
|
||||
CssClass: "css_class",
|
||||
ListClass: "list_class",
|
||||
IsDefault: "is_default",
|
||||
Status: "status",
|
||||
CreateBy: "create_by",
|
||||
UpdateBy: "update_by",
|
||||
Remark: "remark",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysDictDataDao creates and returns a new DAO object for table data access.
|
||||
func NewSysDictDataDao() *SysDictDataDao {
|
||||
return &SysDictDataDao{
|
||||
group: "default",
|
||||
table: "sys_dict_data",
|
||||
columns: sysDictDataColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
func (dao *SysDictDataDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of current dao.
|
||||
func (dao *SysDictDataDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of current dao.
|
||||
func (dao *SysDictDataDao) Columns() SysDictDataColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the configuration group name of database of current dao.
|
||||
func (dao *SysDictDataDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
func (dao *SysDictDataDao) 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 *SysDictDataDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
88
internal/app/common/dao/internal/sys_dict_type.go
Normal file
88
internal/app/common/dao/internal/sys_dict_type.go
Normal file
@ -0,0 +1,88 @@
|
||||
// ==========================================================================
|
||||
// Code generated by GoFrame CLI tool. DO NOT EDIT. Created at 2022-04-16 16:32:52
|
||||
// ==========================================================================
|
||||
|
||||
package internal
|
||||
|
||||
import (
|
||||
"context"
|
||||
"github.com/gogf/gf/v2/database/gdb"
|
||||
"github.com/gogf/gf/v2/frame/g"
|
||||
)
|
||||
|
||||
// SysDictTypeDao is the data access object for table sys_dict_type.
|
||||
type SysDictTypeDao 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 SysDictTypeColumns // columns contains all the column names of Table for convenient usage.
|
||||
}
|
||||
|
||||
// SysDictTypeColumns defines and stores column names for table sys_dict_type.
|
||||
type SysDictTypeColumns struct {
|
||||
DictId string // 字典主键
|
||||
DictName string // 字典名称
|
||||
DictType string // 字典类型
|
||||
Status string // 状态(0正常 1停用)
|
||||
CreateBy string // 创建者
|
||||
UpdateBy string // 更新者
|
||||
Remark string // 备注
|
||||
CreatedAt string // 创建日期
|
||||
UpdatedAt string // 修改日期
|
||||
}
|
||||
|
||||
// sysDictTypeColumns holds the columns for table sys_dict_type.
|
||||
var sysDictTypeColumns = SysDictTypeColumns{
|
||||
DictId: "dict_id",
|
||||
DictName: "dict_name",
|
||||
DictType: "dict_type",
|
||||
Status: "status",
|
||||
CreateBy: "create_by",
|
||||
UpdateBy: "update_by",
|
||||
Remark: "remark",
|
||||
CreatedAt: "created_at",
|
||||
UpdatedAt: "updated_at",
|
||||
}
|
||||
|
||||
// NewSysDictTypeDao creates and returns a new DAO object for table data access.
|
||||
func NewSysDictTypeDao() *SysDictTypeDao {
|
||||
return &SysDictTypeDao{
|
||||
group: "default",
|
||||
table: "sys_dict_type",
|
||||
columns: sysDictTypeColumns,
|
||||
}
|
||||
}
|
||||
|
||||
// DB retrieves and returns the underlying raw database management object of current DAO.
|
||||
func (dao *SysDictTypeDao) DB() gdb.DB {
|
||||
return g.DB(dao.group)
|
||||
}
|
||||
|
||||
// Table returns the table name of current dao.
|
||||
func (dao *SysDictTypeDao) Table() string {
|
||||
return dao.table
|
||||
}
|
||||
|
||||
// Columns returns all column names of current dao.
|
||||
func (dao *SysDictTypeDao) Columns() SysDictTypeColumns {
|
||||
return dao.columns
|
||||
}
|
||||
|
||||
// Group returns the configuration group name of database of current dao.
|
||||
func (dao *SysDictTypeDao) Group() string {
|
||||
return dao.group
|
||||
}
|
||||
|
||||
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
|
||||
func (dao *SysDictTypeDao) 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 *SysDictTypeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx gdb.TX) error) (err error) {
|
||||
return dao.Ctx(ctx).Transaction(ctx, f)
|
||||
}
|
||||
24
internal/app/common/dao/sys_config.go
Normal file
24
internal/app/common/dao/sys_config.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"github.com/tiger1103/gfast/v3/internal/app/common/dao/internal"
|
||||
)
|
||||
|
||||
// sysConfigDao is the data access object for table sys_config.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
type sysConfigDao struct {
|
||||
*internal.SysConfigDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysConfig is globally public accessible object for table sys_config operations.
|
||||
SysConfig = sysConfigDao{
|
||||
internal.NewSysConfigDao(),
|
||||
}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
24
internal/app/common/dao/sys_dict_data.go
Normal file
24
internal/app/common/dao/sys_dict_data.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"github.com/tiger1103/gfast/v3/internal/app/common/dao/internal"
|
||||
)
|
||||
|
||||
// sysDictDataDao is the data access object for table sys_dict_data.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
type sysDictDataDao struct {
|
||||
*internal.SysDictDataDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysDictData is globally public accessible object for table sys_dict_data operations.
|
||||
SysDictData = sysDictDataDao{
|
||||
internal.NewSysDictDataDao(),
|
||||
}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
24
internal/app/common/dao/sys_dict_type.go
Normal file
24
internal/app/common/dao/sys_dict_type.go
Normal file
@ -0,0 +1,24 @@
|
||||
// =================================================================================
|
||||
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
|
||||
// =================================================================================
|
||||
|
||||
package dao
|
||||
|
||||
import (
|
||||
"github.com/tiger1103/gfast/v3/internal/app/common/dao/internal"
|
||||
)
|
||||
|
||||
// sysDictTypeDao is the data access object for table sys_dict_type.
|
||||
// You can define custom methods on it to extend its functionality as you wish.
|
||||
type sysDictTypeDao struct {
|
||||
*internal.SysDictTypeDao
|
||||
}
|
||||
|
||||
var (
|
||||
// SysDictType is globally public accessible object for table sys_dict_type operations.
|
||||
SysDictType = sysDictTypeDao{
|
||||
internal.NewSysDictTypeDao(),
|
||||
}
|
||||
)
|
||||
|
||||
// Fill with you ideas below.
|
||||
Reference in New Issue
Block a user