This commit is contained in:
孟帅
2022-11-24 23:37:34 +08:00
parent 4ffe54b6ac
commit 29bda0dcdd
1487 changed files with 97869 additions and 96539 deletions

View File

@@ -0,0 +1,95 @@
// ==========================================================================
// 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"
)
// AdminDeptDao is the data access object for table hg_admin_dept.
type AdminDeptDao 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 AdminDeptColumns // columns contains all the column names of Table for convenient usage.
}
// AdminDeptColumns defines and stores column names for table hg_admin_dept.
type AdminDeptColumns struct {
Id string // 部门id
Pid string // 父部门id
Name string // 部门名称
Code string // 部门编码
Type string // 部门类型
Leader string // 负责人
Phone string // 联系电话
Email string // 邮箱
Sort string // 排序
Status string // 部门状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// adminDeptColumns holds the columns for table hg_admin_dept.
var adminDeptColumns = AdminDeptColumns{
Id: "id",
Pid: "pid",
Name: "name",
Code: "code",
Type: "type",
Leader: "leader",
Phone: "phone",
Email: "email",
Sort: "sort",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewAdminDeptDao creates and returns a new DAO object for table data access.
func NewAdminDeptDao() *AdminDeptDao {
return &AdminDeptDao{
group: "default",
table: "hg_admin_dept",
columns: adminDeptColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminDeptDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminDeptDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminDeptDao) Columns() AdminDeptColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminDeptDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminDeptDao) 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 *AdminDeptDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,129 @@
// ==========================================================================
// 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"
)
// AdminMemberDao is the data access object for table hg_admin_member.
type AdminMemberDao 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 AdminMemberColumns // columns contains all the column names of Table for convenient usage.
}
// AdminMemberColumns defines and stores column names for table hg_admin_member.
type AdminMemberColumns struct {
Id string //
DeptId string // 部门ID
Username string // 帐号
PasswordHash string // 密码
Salt string // 密码盐
AuthKey string // 授权令牌
PasswordResetToken string // 密码重置令牌
Type string // 1:普通管理员;10超级管理员
Realname string // 真实姓名
Avatar string // 头像
Sex string // 性别[1:男;2:女;3:未知]
Qq string // qq
Email string // 邮箱
Birthday string // 生日
ProvinceId string // 省
CityId string // 城市
AreaId string // 地区
Address string // 默认地址
Mobile string // 手机号码
HomePhone string // 家庭号码
DingtalkRobotToken string // 钉钉机器人token
VisitCount string // 访问次数
LastTime string // 最后一次登录时间
LastIp string // 最后一次登录ip
Role string // 权限
Remark string // 备注
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 修改时间
}
// adminMemberColumns holds the columns for table hg_admin_member.
var adminMemberColumns = AdminMemberColumns{
Id: "id",
DeptId: "dept_id",
Username: "username",
PasswordHash: "password_hash",
Salt: "salt",
AuthKey: "auth_key",
PasswordResetToken: "password_reset_token",
Type: "type",
Realname: "realname",
Avatar: "avatar",
Sex: "sex",
Qq: "qq",
Email: "email",
Birthday: "birthday",
ProvinceId: "province_id",
CityId: "city_id",
AreaId: "area_id",
Address: "address",
Mobile: "mobile",
HomePhone: "home_phone",
DingtalkRobotToken: "dingtalk_robot_token",
VisitCount: "visit_count",
LastTime: "last_time",
LastIp: "last_ip",
Role: "role",
Remark: "remark",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewAdminMemberDao creates and returns a new DAO object for table data access.
func NewAdminMemberDao() *AdminMemberDao {
return &AdminMemberDao{
group: "default",
table: "hg_admin_member",
columns: adminMemberColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminMemberDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminMemberDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminMemberDao) Columns() AdminMemberColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminMemberDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminMemberDao) 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 *AdminMemberDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,75 @@
// ==========================================================================
// 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"
)
// AdminMemberPostDao is the data access object for table hg_admin_member_post.
type AdminMemberPostDao 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 AdminMemberPostColumns // columns contains all the column names of Table for convenient usage.
}
// AdminMemberPostColumns defines and stores column names for table hg_admin_member_post.
type AdminMemberPostColumns struct {
MemberId string // 用户ID
PostId string // 岗位ID
}
// adminMemberPostColumns holds the columns for table hg_admin_member_post.
var adminMemberPostColumns = AdminMemberPostColumns{
MemberId: "member_id",
PostId: "post_id",
}
// NewAdminMemberPostDao creates and returns a new DAO object for table data access.
func NewAdminMemberPostDao() *AdminMemberPostDao {
return &AdminMemberPostDao{
group: "default",
table: "hg_admin_member_post",
columns: adminMemberPostColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminMemberPostDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminMemberPostDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminMemberPostDao) Columns() AdminMemberPostColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminMemberPostDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminMemberPostDao) 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 *AdminMemberPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,75 @@
// ==========================================================================
// 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"
)
// AdminMemberRoleDao is the data access object for table hg_admin_member_role.
type AdminMemberRoleDao 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 AdminMemberRoleColumns // columns contains all the column names of Table for convenient usage.
}
// AdminMemberRoleColumns defines and stores column names for table hg_admin_member_role.
type AdminMemberRoleColumns struct {
MemberId string // 用户ID
RoleId string // 角色ID
}
// adminMemberRoleColumns holds the columns for table hg_admin_member_role.
var adminMemberRoleColumns = AdminMemberRoleColumns{
MemberId: "member_id",
RoleId: "role_id",
}
// NewAdminMemberRoleDao creates and returns a new DAO object for table data access.
func NewAdminMemberRoleDao() *AdminMemberRoleDao {
return &AdminMemberRoleDao{
group: "default",
table: "hg_admin_member_role",
columns: adminMemberRoleColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminMemberRoleDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminMemberRoleDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminMemberRoleDao) Columns() AdminMemberRoleColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminMemberRoleDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminMemberRoleDao) 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 *AdminMemberRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,123 @@
// ==========================================================================
// 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"
)
// AdminMenuDao is the data access object for table hg_admin_menu.
type AdminMenuDao 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 AdminMenuColumns // columns contains all the column names of Table for convenient usage.
}
// AdminMenuColumns defines and stores column names for table hg_admin_menu.
type AdminMenuColumns struct {
Id string // 菜单ID
Pid string // 父菜单ID
Title string // 菜单名称
Name string // 名称编码
Path string // 路由地址
Icon string // 菜单图标
Type string // 菜单类型1目录 2菜单 3按钮
Redirect string // 重定向地址
Permissions string // 菜单包含权限集合
PermissionName string // 权限名称
Component string // 组件路径
AlwaysShow string // 取消自动计算根路由模式
ActiveMenu string // 高亮菜单编码
IsRoot string // 是否跟路由
IsFrame string // 是否内嵌
FrameSrc string // 内联外部地址
KeepAlive string // 缓存该路由
Hidden string // 是否隐藏
Affix string // 是否固定
Level string // 级别
Tree string // 树
Sort string // 排序
Remark string // 备注
Status string // 菜单状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// adminMenuColumns holds the columns for table hg_admin_menu.
var adminMenuColumns = AdminMenuColumns{
Id: "id",
Pid: "pid",
Title: "title",
Name: "name",
Path: "path",
Icon: "icon",
Type: "type",
Redirect: "redirect",
Permissions: "permissions",
PermissionName: "permission_name",
Component: "component",
AlwaysShow: "always_show",
ActiveMenu: "active_menu",
IsRoot: "is_root",
IsFrame: "is_frame",
FrameSrc: "frame_src",
KeepAlive: "keep_alive",
Hidden: "hidden",
Affix: "affix",
Level: "level",
Tree: "tree",
Sort: "sort",
Remark: "remark",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewAdminMenuDao creates and returns a new DAO object for table data access.
func NewAdminMenuDao() *AdminMenuDao {
return &AdminMenuDao{
group: "default",
table: "hg_admin_menu",
columns: adminMenuColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminMenuDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminMenuDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminMenuDao) Columns() AdminMenuColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminMenuDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminMenuDao) 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 *AdminMenuDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,93 @@
// ==========================================================================
// 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"
)
// AdminNoticeDao is the data access object for table hg_admin_notice.
type AdminNoticeDao 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 AdminNoticeColumns // columns contains all the column names of Table for convenient usage.
}
// AdminNoticeColumns defines and stores column names for table hg_admin_notice.
type AdminNoticeColumns struct {
Id string // 公告ID
Title string // 公告标题
Type string // 公告类型1通知 2公告
Content string // 公告内容
Receiver string // 接收者
Reader string // 已读人
Remark string // 备注
Sort string // 排序
Status string // 公告状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// adminNoticeColumns holds the columns for table hg_admin_notice.
var adminNoticeColumns = AdminNoticeColumns{
Id: "id",
Title: "title",
Type: "type",
Content: "content",
Receiver: "receiver",
Reader: "reader",
Remark: "remark",
Sort: "sort",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewAdminNoticeDao creates and returns a new DAO object for table data access.
func NewAdminNoticeDao() *AdminNoticeDao {
return &AdminNoticeDao{
group: "default",
table: "hg_admin_notice",
columns: adminNoticeColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminNoticeDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminNoticeDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminNoticeDao) Columns() AdminNoticeColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminNoticeDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminNoticeDao) 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 *AdminNoticeDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,87 @@
// ==========================================================================
// 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"
)
// AdminPostDao is the data access object for table hg_admin_post.
type AdminPostDao 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 AdminPostColumns // columns contains all the column names of Table for convenient usage.
}
// AdminPostColumns defines and stores column names for table hg_admin_post.
type AdminPostColumns struct {
Id string // 岗位ID
Code string // 岗位编码
Name string // 岗位名称
Remark string // 备注
Sort string // 显示顺序
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// adminPostColumns holds the columns for table hg_admin_post.
var adminPostColumns = AdminPostColumns{
Id: "id",
Code: "code",
Name: "name",
Remark: "remark",
Sort: "sort",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewAdminPostDao creates and returns a new DAO object for table data access.
func NewAdminPostDao() *AdminPostDao {
return &AdminPostDao{
group: "default",
table: "hg_admin_post",
columns: adminPostColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminPostDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminPostDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminPostDao) Columns() AdminPostColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminPostDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminPostDao) 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 *AdminPostDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,93 @@
// ==========================================================================
// 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"
)
// AdminRoleDao is the data access object for table hg_admin_role.
type AdminRoleDao 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 AdminRoleColumns // columns contains all the column names of Table for convenient usage.
}
// AdminRoleColumns defines and stores column names for table hg_admin_role.
type AdminRoleColumns struct {
Id string // 角色ID
Name string // 角色名称
Key string // 角色权限字符串
DataScope string // 数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限
MenuCheckStrictly string // 菜单树选择项是否关联显示
DeptCheckStrictly string // 部门树选择项是否关联显示
Remark string // 备注
Sort string // 排序
Status string // 角色状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// adminRoleColumns holds the columns for table hg_admin_role.
var adminRoleColumns = AdminRoleColumns{
Id: "id",
Name: "name",
Key: "key",
DataScope: "data_scope",
MenuCheckStrictly: "menu_check_strictly",
DeptCheckStrictly: "dept_check_strictly",
Remark: "remark",
Sort: "sort",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewAdminRoleDao creates and returns a new DAO object for table data access.
func NewAdminRoleDao() *AdminRoleDao {
return &AdminRoleDao{
group: "default",
table: "hg_admin_role",
columns: adminRoleColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminRoleDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminRoleDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminRoleDao) Columns() AdminRoleColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminRoleDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminRoleDao) 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 *AdminRoleDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,87 @@
// ==========================================================================
// 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"
)
// AdminRoleCasbinDao is the data access object for table hg_admin_role_casbin.
type AdminRoleCasbinDao 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 AdminRoleCasbinColumns // columns contains all the column names of Table for convenient usage.
}
// AdminRoleCasbinColumns defines and stores column names for table hg_admin_role_casbin.
type AdminRoleCasbinColumns struct {
Id string //
PType string //
V0 string //
V1 string //
V2 string //
V3 string //
V4 string //
V5 string //
}
// adminRoleCasbinColumns holds the columns for table hg_admin_role_casbin.
var adminRoleCasbinColumns = AdminRoleCasbinColumns{
Id: "id",
PType: "p_type",
V0: "v0",
V1: "v1",
V2: "v2",
V3: "v3",
V4: "v4",
V5: "v5",
}
// NewAdminRoleCasbinDao creates and returns a new DAO object for table data access.
func NewAdminRoleCasbinDao() *AdminRoleCasbinDao {
return &AdminRoleCasbinDao{
group: "default",
table: "hg_admin_role_casbin",
columns: adminRoleCasbinColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminRoleCasbinDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminRoleCasbinDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminRoleCasbinDao) Columns() AdminRoleCasbinColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminRoleCasbinDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminRoleCasbinDao) 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 *AdminRoleCasbinDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,75 @@
// ==========================================================================
// 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"
)
// AdminRoleDeptDao is the data access object for table hg_admin_role_dept.
type AdminRoleDeptDao 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 AdminRoleDeptColumns // columns contains all the column names of Table for convenient usage.
}
// AdminRoleDeptColumns defines and stores column names for table hg_admin_role_dept.
type AdminRoleDeptColumns struct {
RoleId string // 角色ID
DeptId string // 部门ID
}
// adminRoleDeptColumns holds the columns for table hg_admin_role_dept.
var adminRoleDeptColumns = AdminRoleDeptColumns{
RoleId: "role_id",
DeptId: "dept_id",
}
// NewAdminRoleDeptDao creates and returns a new DAO object for table data access.
func NewAdminRoleDeptDao() *AdminRoleDeptDao {
return &AdminRoleDeptDao{
group: "default",
table: "hg_admin_role_dept",
columns: adminRoleDeptColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminRoleDeptDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminRoleDeptDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminRoleDeptDao) Columns() AdminRoleDeptColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminRoleDeptDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminRoleDeptDao) 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 *AdminRoleDeptDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,75 @@
// ==========================================================================
// 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"
)
// AdminRoleMenuDao is the data access object for table hg_admin_role_menu.
type AdminRoleMenuDao 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 AdminRoleMenuColumns // columns contains all the column names of Table for convenient usage.
}
// AdminRoleMenuColumns defines and stores column names for table hg_admin_role_menu.
type AdminRoleMenuColumns struct {
RoleId string // 角色ID
MenuId string // 菜单ID
}
// adminRoleMenuColumns holds the columns for table hg_admin_role_menu.
var adminRoleMenuColumns = AdminRoleMenuColumns{
RoleId: "role_id",
MenuId: "menu_id",
}
// NewAdminRoleMenuDao creates and returns a new DAO object for table data access.
func NewAdminRoleMenuDao() *AdminRoleMenuDao {
return &AdminRoleMenuDao{
group: "default",
table: "hg_admin_role_menu",
columns: adminRoleMenuColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminRoleMenuDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminRoleMenuDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminRoleMenuDao) Columns() AdminRoleMenuColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminRoleMenuDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminRoleMenuDao) 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 *AdminRoleMenuDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,105 @@
// ==========================================================================
// 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"
)
// SysAttachmentDao is the data access object for table hg_sys_attachment.
type SysAttachmentDao 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 SysAttachmentColumns // columns contains all the column names of Table for convenient usage.
}
// SysAttachmentColumns defines and stores column names for table hg_sys_attachment.
type SysAttachmentColumns struct {
Id string //
AppId string // 应用ID
MemberId string // 用户
CateId string // 分类
Drive string // 驱动
Name string // 文件原始名
Kind string // 上传类型
MetaType string // 类别
NaiveType string // NaiveUI类型
Path string // 本地路径
FileUrl string // url
Size string // 长度
Ext string // 扩展名
Md5 string // md5校验码
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 修改时间
}
// sysAttachmentColumns holds the columns for table hg_sys_attachment.
var sysAttachmentColumns = SysAttachmentColumns{
Id: "id",
AppId: "app_id",
MemberId: "member_id",
CateId: "cate_id",
Drive: "drive",
Name: "name",
Kind: "kind",
MetaType: "meta_type",
NaiveType: "naive_type",
Path: "path",
FileUrl: "file_url",
Size: "size",
Ext: "ext",
Md5: "md5",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewSysAttachmentDao creates and returns a new DAO object for table data access.
func NewSysAttachmentDao() *SysAttachmentDao {
return &SysAttachmentDao{
group: "default",
table: "hg_sys_attachment",
columns: sysAttachmentColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *SysAttachmentDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *SysAttachmentDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *SysAttachmentDao) Columns() SysAttachmentColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *SysAttachmentDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *SysAttachmentDao) 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 *SysAttachmentDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,83 @@
// ==========================================================================
// 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"
)
// SysBlacklistDao is the data access object for table hg_sys_blacklist.
type SysBlacklistDao 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 SysBlacklistColumns // columns contains all the column names of Table for convenient usage.
}
// SysBlacklistColumns defines and stores column names for table hg_sys_blacklist.
type SysBlacklistColumns struct {
Id string // 主键
Ip string // ip地址
Remark string // 备注
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// sysBlacklistColumns holds the columns for table hg_sys_blacklist.
var sysBlacklistColumns = SysBlacklistColumns{
Id: "id",
Ip: "ip",
Remark: "remark",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewSysBlacklistDao creates and returns a new DAO object for table data access.
func NewSysBlacklistDao() *SysBlacklistDao {
return &SysBlacklistDao{
group: "default",
table: "hg_sys_blacklist",
columns: sysBlacklistColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *SysBlacklistDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *SysBlacklistDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *SysBlacklistDao) Columns() SysBlacklistColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *SysBlacklistDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *SysBlacklistDao) 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 *SysBlacklistDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,97 @@
// ==========================================================================
// 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"
)
// SysConfigDao is the data access object for table hg_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 hg_sys_config.
type SysConfigColumns struct {
Id string // 配置ID
Group string // 分组
Name string // 参数名称
Type string // 类型:string,text,int,bool,array,datetime,date,file
Key string // 参数键名
Value string // 参数键值
DefaultValue string // 默认值
Sort string // 排序
Tip string // 变量描述
IsDefault string // 是否默认
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// sysConfigColumns holds the columns for table hg_sys_config.
var sysConfigColumns = SysConfigColumns{
Id: "id",
Group: "group",
Name: "name",
Type: "type",
Key: "key",
Value: "value",
DefaultValue: "default_value",
Sort: "sort",
Tip: "tip",
IsDefault: "is_default",
Status: "status",
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: "hg_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)
}

View File

@@ -0,0 +1,95 @@
// ==========================================================================
// 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"
)
// SysCronDao is the data access object for table hg_sys_cron.
type SysCronDao 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 SysCronColumns // columns contains all the column names of Table for convenient usage.
}
// SysCronColumns defines and stores column names for table hg_sys_cron.
type SysCronColumns struct {
Id string // 主键
GroupId string // 分组ID
Name string // 任务名称
Params string // 函数参数
Pattern string // 定时表达式
Policy string // 策略
Count string // 执行次数
Sort string // 排序
Remark string // 备注
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// sysCronColumns holds the columns for table hg_sys_cron.
var sysCronColumns = SysCronColumns{
Id: "id",
GroupId: "group_id",
Name: "name",
Params: "params",
Pattern: "pattern",
Policy: "policy",
Count: "count",
Sort: "sort",
Remark: "remark",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewSysCronDao creates and returns a new DAO object for table data access.
func NewSysCronDao() *SysCronDao {
return &SysCronDao{
group: "default",
table: "hg_sys_cron",
columns: sysCronColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *SysCronDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *SysCronDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *SysCronDao) Columns() SysCronColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *SysCronDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *SysCronDao) 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 *SysCronDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,89 @@
// ==========================================================================
// 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"
)
// SysCronGroupDao is the data access object for table hg_sys_cron_group.
type SysCronGroupDao 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 SysCronGroupColumns // columns contains all the column names of Table for convenient usage.
}
// SysCronGroupColumns defines and stores column names for table hg_sys_cron_group.
type SysCronGroupColumns struct {
Id string // 主键
Pid string // 父类ID
Name string // 分组名称
IsDefault string // 是否默认
Sort string // 排序
Remark string // 备注
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// sysCronGroupColumns holds the columns for table hg_sys_cron_group.
var sysCronGroupColumns = SysCronGroupColumns{
Id: "id",
Pid: "pid",
Name: "name",
IsDefault: "is_default",
Sort: "sort",
Remark: "remark",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewSysCronGroupDao creates and returns a new DAO object for table data access.
func NewSysCronGroupDao() *SysCronGroupDao {
return &SysCronGroupDao{
group: "default",
table: "hg_sys_cron_group",
columns: sysCronGroupColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *SysCronGroupDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *SysCronGroupDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *SysCronGroupDao) Columns() SysCronGroupColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *SysCronGroupDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *SysCronGroupDao) 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 *SysCronGroupDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,93 @@
// ==========================================================================
// 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"
)
// SysDictDataDao is the data access object for table hg_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 hg_sys_dict_data.
type SysDictDataColumns struct {
Id string // 字典编码
Label string // 字典标签
Value string // 字典键值
Type string // 字典类型
ListClass string // 表格回显样式
IsDefault string // 是否默认
Sort string // 字典排序
Remark string // 备注
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// sysDictDataColumns holds the columns for table hg_sys_dict_data.
var sysDictDataColumns = SysDictDataColumns{
Id: "id",
Label: "label",
Value: "value",
Type: "type",
ListClass: "list_class",
IsDefault: "is_default",
Sort: "sort",
Remark: "remark",
Status: "status",
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: "hg_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)
}

View File

@@ -0,0 +1,89 @@
// ==========================================================================
// 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"
)
// SysDictTypeDao is the data access object for table hg_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 hg_sys_dict_type.
type SysDictTypeColumns struct {
Id string // 字典主键
Pid string // 父类ID
Name string // 字典名称
Type string // 字典类型
Sort string // 排序
Remark string // 备注
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// sysDictTypeColumns holds the columns for table hg_sys_dict_type.
var sysDictTypeColumns = SysDictTypeColumns{
Id: "id",
Pid: "pid",
Name: "name",
Type: "type",
Sort: "sort",
Remark: "remark",
Status: "status",
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: "hg_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)
}

View File

@@ -0,0 +1,117 @@
// ==========================================================================
// 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"
)
// SysLogDao is the data access object for table hg_sys_log.
type SysLogDao 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 SysLogColumns // columns contains all the column names of Table for convenient usage.
}
// SysLogColumns defines and stores column names for table hg_sys_log.
type SysLogColumns struct {
Id string //
AppId string // 应用id
MerchantId string // 商户id
MemberId string // 用户id
Method string // 提交类型
Module string // 模块
Url string // 提交url
GetData string // get数据
PostData string // post数据
HeaderData string // header数据
Ip string // ip地址
ProvinceId string // 省编码
CityId string // 市编码
ErrorCode string // 报错code
ErrorMsg string // 报错信息
ErrorData string // 报错日志
ReqId string // 对外id
Timestamp string // 响应时间
UserAgent string // UA信息
TakeUpTime string // 请求耗时
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 修改时间
}
// sysLogColumns holds the columns for table hg_sys_log.
var sysLogColumns = SysLogColumns{
Id: "id",
AppId: "app_id",
MerchantId: "merchant_id",
MemberId: "member_id",
Method: "method",
Module: "module",
Url: "url",
GetData: "get_data",
PostData: "post_data",
HeaderData: "header_data",
Ip: "ip",
ProvinceId: "province_id",
CityId: "city_id",
ErrorCode: "error_code",
ErrorMsg: "error_msg",
ErrorData: "error_data",
ReqId: "req_id",
Timestamp: "timestamp",
UserAgent: "user_agent",
TakeUpTime: "take_up_time",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewSysLogDao creates and returns a new DAO object for table data access.
func NewSysLogDao() *SysLogDao {
return &SysLogDao{
group: "default",
table: "hg_sys_log",
columns: sysLogColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *SysLogDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *SysLogDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *SysLogDao) Columns() SysLogColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *SysLogDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *SysLogDao) 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 *SysLogDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}

View File

@@ -0,0 +1,101 @@
// ==========================================================================
// 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"
)
// SysProvincesDao is the data access object for table hg_sys_provinces.
type SysProvincesDao 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 SysProvincesColumns // columns contains all the column names of Table for convenient usage.
}
// SysProvincesColumns defines and stores column names for table hg_sys_provinces.
type SysProvincesColumns struct {
Id string // ID
Title string // 栏目名
Pid string // 父栏目
ShortTitle string // 缩写
Areacode string // 区域编码
Zipcode string // 邮政编码
Pinyin string // 拼音
Lng string // 经度
Lat string // 纬度
Level string // 级别
Tree string //
Sort string // 排序
Status string // 状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// sysProvincesColumns holds the columns for table hg_sys_provinces.
var sysProvincesColumns = SysProvincesColumns{
Id: "id",
Title: "title",
Pid: "pid",
ShortTitle: "short_title",
Areacode: "areacode",
Zipcode: "zipcode",
Pinyin: "pinyin",
Lng: "lng",
Lat: "lat",
Level: "level",
Tree: "tree",
Sort: "sort",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewSysProvincesDao creates and returns a new DAO object for table data access.
func NewSysProvincesDao() *SysProvincesDao {
return &SysProvincesDao{
group: "default",
table: "hg_sys_provinces",
columns: sysProvincesColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *SysProvincesDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *SysProvincesDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *SysProvincesDao) Columns() SysProvincesColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *SysProvincesDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *SysProvincesDao) 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 *SysProvincesDao) Transaction(ctx context.Context, f func(ctx context.Context, tx *gdb.TX) error) (err error) {
return dao.Ctx(ctx).Transaction(ctx, f)
}