This commit is contained in:
孟帅
2022-02-25 17:11:17 +08:00
parent 9bd05abb2c
commit 8f3d679a57
897 changed files with 95731 additions and 0 deletions

View File

@@ -0,0 +1,81 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/bufanyun/hotgo/app/consts"
"github.com/bufanyun/hotgo/app/model/entity"
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
"github.com/gogf/gf/v2/errors/gerror"
)
// adminDeptDao is the data access object for table hg_admin_dept.
// You can define custom methods on it to extend its functionality as you wish.
type adminDeptDao struct {
*internal.AdminDeptDao
}
var (
// AdminDept is globally public accessible object for table hg_admin_dept operations.
AdminDept = adminDeptDao{
internal.NewAdminDeptDao(),
}
)
//
//  @Title  判断名称是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   name
//  @Return  bool
//  @Return  error
//
func (dao *adminDeptDao) IsUniqueName(ctx context.Context, id int64, name string) (bool, error) {
var data *entity.AdminDept
m := dao.Ctx(ctx).Where("name", name)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
//
//  @Title  获取最上级pid
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   data
//  @Return  int64
//  @Return  error
//
func (dao *adminDeptDao) TopPid(ctx context.Context, data *entity.AdminDept) (int64, error) {
var pidData *entity.AdminDept
if data.Pid == 0 {
return data.Id, nil
}
err := dao.Ctx(ctx).Where("id", data.Pid).Scan(&pidData)
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return 0, err
}
return dao.TopPid(ctx, pidData)
}
// Fill with you ideas below.

View File

@@ -0,0 +1,118 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/bufanyun/hotgo/app/consts"
"github.com/bufanyun/hotgo/app/model/entity"
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
"github.com/gogf/gf/v2/errors/gerror"
)
// adminMemberDao is the data access object for table hg_admin_member.
// You can define custom methods on it to extend its functionality as you wish.
type adminMemberDao struct {
*internal.AdminMemberDao
}
var (
// AdminMember is globally public accessible object for table hg_admin_member operations.
AdminMember = adminMemberDao{
internal.NewAdminMemberDao(),
}
)
//
//  @Title  判断用户名是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   name
//  @Return  bool
//  @Return  error
//
func (dao *adminMemberDao) IsUniqueName(ctx context.Context, id int64, name string) (bool, error) {
var data *entity.AdminDept
m := dao.Ctx(ctx).Where("username", name)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
//
//  @Title  判断邮箱是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   name
//  @Return  bool
//  @Return  error
//
func (dao *adminMemberDao) IsUniqueEmail(ctx context.Context, id int64, email string) (bool, error) {
var data *entity.AdminMember
m := dao.Ctx(ctx).Where("email", email)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
//
//  @Title  判断手机号是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   name
//  @Return  bool
//  @Return  error
//
func (dao *adminMemberDao) IsUniqueMobile(ctx context.Context, id int64, mobile string) (bool, error) {
var data *entity.AdminMember
m := dao.Ctx(ctx).Where("mobile", mobile)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
// Fill with you ideas below.

View 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/bufanyun/hotgo/app/service/internal/dao/internal"
)
// adminMemberPostDao is the data access object for table hg_admin_member_post.
// You can define custom methods on it to extend its functionality as you wish.
type adminMemberPostDao struct {
*internal.AdminMemberPostDao
}
var (
// AdminMemberPost is globally public accessible object for table hg_admin_member_post operations.
AdminMemberPost = adminMemberPostDao{
internal.NewAdminMemberPostDao(),
}
)
// Fill with you ideas below.

View 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/bufanyun/hotgo/app/service/internal/dao/internal"
)
// adminMemberRoleDao is the data access object for table hg_admin_member_role.
// You can define custom methods on it to extend its functionality as you wish.
type adminMemberRoleDao struct {
*internal.AdminMemberRoleDao
}
var (
// AdminMemberRole is globally public accessible object for table hg_admin_member_role operations.
AdminMemberRole = adminMemberRoleDao{
internal.NewAdminMemberRoleDao(),
}
)
// Fill with you ideas below.

View File

@@ -0,0 +1,180 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/bufanyun/hotgo/app/consts"
"github.com/bufanyun/hotgo/app/model"
"github.com/bufanyun/hotgo/app/model/entity"
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
"github.com/gogf/gf/v2/errors/gerror"
)
// @Description
type adminMenuDao struct {
*internal.AdminMenuDao //  }
}
var (
// AdminMenu is globally public accessible object for table hg_admin_menu operations.
AdminMenu = adminMenuDao{
internal.NewAdminMenuDao(),
}
)
//
//  @Title  判断名称是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   name
//  @Return  bool
//  @Return  error
//
func (dao *adminMenuDao) IsUniqueName(ctx context.Context, id int64, name string) (bool, error) {
var data *entity.AdminMenu
m := dao.Ctx(ctx).Where("name", name)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
//
//  @Title  判断编码是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   code
//  @Return  bool
//  @Return  error
//
func (dao *adminMenuDao) IsUniqueCode(ctx context.Context, id int64, code string) (bool, error) {
var data *entity.AdminMenu
m := dao.Ctx(ctx).Where("code", code)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
//
//  @Title  生成kl树列表
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   pid
//  @Param   lists
//  @Return  []*model.TreeMenu
//  @Return  error
//
func (dao *adminMenuDao) GenLabelTreeList(ctx context.Context, pid int64) ([]*model.LabelTreeMenu, error) {
var (
newLst []*model.LabelTreeMenu
)
if err := dao.Ctx(ctx).Where("pid", pid).Order("sort asc,id desc").Scan(&newLst); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return nil, err
}
for i := 0; i < len(newLst); i++ {
newLst[i].Key = newLst[i].Id
newLst[i].Label = newLst[i].Name
err := dao.Ctx(ctx).Where("pid", newLst[i].Id).Order("sort asc,id desc").Scan(&newLst[i].Children)
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return nil, err
}
for i2 := 0; i2 < len(newLst[i].Children); i2++ {
newLst[i].Children[i2].Key = newLst[i].Children[i2].Id
newLst[i].Children[i2].Label = newLst[i].Children[i2].Name
}
}
return newLst, nil
}
//
//  @Title  生成树列表
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   pid
//  @Param   lists
//  @Return  []*model.TreeMenu
//  @Return  error
//
func (dao *adminMenuDao) GenTreeList(ctx context.Context, pid int64, ids []int64) ([]*model.TreeMenu, error) {
var (
newLst []*model.TreeMenu
)
if err := dao.Ctx(ctx).Where("id", ids).Where("pid", pid).Order("sort asc,id desc").Scan(&newLst); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return nil, err
}
for i := 0; i < len(newLst); i++ {
err := dao.Ctx(ctx).Where("pid", newLst[i].Id).Order("sort asc,id desc").Scan(&newLst[i].Children)
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return nil, err
}
}
return newLst, nil
}
//
//  @Title  获取最上级pid
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   data
//  @Return  int64
//  @Return  error
//
func (dao *adminMenuDao) TopPid(ctx context.Context, data *entity.AdminMenu) (int64, error) {
var pidData *entity.AdminMenu
if data.Pid == 0 {
return data.Id, nil
}
err := dao.Ctx(ctx).Where("id", data.Pid).Scan(&pidData)
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return 0, err
}
return dao.TopPid(ctx, pidData)
}
// Fill with you ideas below.

View 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/bufanyun/hotgo/app/service/internal/dao/internal"
)
// adminMenuOldDao is the data access object for table hg_admin_menu_old.
// You can define custom methods on it to extend its functionality as you wish.
type adminMenuOldDao struct {
*internal.AdminMenuOldDao
}
var (
// AdminMenuOld is globally public accessible object for table hg_admin_menu_old operations.
AdminMenuOld = adminMenuOldDao{
internal.NewAdminMenuOldDao(),
}
)
// Fill with you ideas below.

View File

@@ -0,0 +1,58 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/bufanyun/hotgo/app/consts"
"github.com/bufanyun/hotgo/app/model/entity"
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
"github.com/gogf/gf/v2/errors/gerror"
)
// adminNoticeDao is the data access object for table hg_admin_notice.
// You can define custom methods on it to extend its functionality as you wish.
type adminNoticeDao struct {
*internal.AdminNoticeDao
}
var (
// AdminNotice is globally public accessible object for table hg_admin_notice operations.
AdminNotice = adminNoticeDao{
internal.NewAdminNoticeDao(),
}
)
// Fill with you ideas below.
//
//  @Title  判断名称是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   name
//  @Return  bool
//  @Return  error
//
func (dao *adminNoticeDao) IsUniqueTitle(ctx context.Context, id int64, title string) (bool, error) {
var data *entity.AdminNotice
m := dao.Ctx(ctx).Where("title", title)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}

View File

@@ -0,0 +1,88 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/bufanyun/hotgo/app/consts"
"github.com/bufanyun/hotgo/app/model/entity"
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
"github.com/gogf/gf/v2/errors/gerror"
)
// adminPostDao is the data access object for table hg_admin_post.
// You can define custom methods on it to extend its functionality as you wish.
type adminPostDao struct {
*internal.AdminPostDao
}
var (
// AdminPost is globally public accessible object for table hg_admin_post operations.
AdminPost = adminPostDao{
internal.NewAdminPostDao(),
}
)
// Fill with you ideas below.
//
//  @Title  判断名称是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   name
//  @Return  bool
//  @Return  error
//
func (dao *adminPostDao) IsUniqueName(ctx context.Context, id int64, name string) (bool, error) {
var data *entity.AdminPost
m := dao.Ctx(ctx).Where("name", name)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
//
//  @Title  判断编码是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   code
//  @Return  bool
//  @Return  error
//
func (dao *adminPostDao) IsUniqueCode(ctx context.Context, id int64, code string) (bool, error) {
var data *entity.AdminPost
m := dao.Ctx(ctx).Where("code", code)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}

View 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/bufanyun/hotgo/app/service/internal/dao/internal"
)
// adminRoleDao is the data access object for table hg_admin_role.
// You can define custom methods on it to extend its functionality as you wish.
type adminRoleDao struct {
*internal.AdminRoleDao
}
var (
// AdminRole is globally public accessible object for table hg_admin_role operations.
AdminRole = adminRoleDao{
internal.NewAdminRoleDao(),
}
)
// Fill with you ideas below.

View File

@@ -0,0 +1,29 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
//
// @Package  dao
// @Description 
// @Author  Ms <133814250@qq.com>
//
package dao
import (
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
)
// adminRoleDeptDao is the data access object for table hg_admin_role_dept.
// You can define custom methods on it to extend its functionality as you wish.
type adminRoleDeptDao struct {
*internal.AdminRoleDeptDao
}
var (
// AdminRoleDept is globally public accessible object for table hg_admin_role_dept operations.
AdminRoleDept = adminRoleDeptDao{
internal.NewAdminRoleDeptDao(),
}
)
// Fill with you ideas below.

View 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/bufanyun/hotgo/app/service/internal/dao/internal"
)
// adminRoleMenuDao is the data access object for table hg_admin_role_menu.
// You can define custom methods on it to extend its functionality as you wish.
type adminRoleMenuDao struct {
*internal.AdminRoleMenuDao
}
var (
// AdminRoleMenu is globally public accessible object for table hg_admin_role_menu operations.
AdminRoleMenu = adminRoleMenuDao{
internal.NewAdminRoleMenuDao(),
}
)
// Fill with you ideas below.

View File

@@ -0,0 +1,96 @@
// ==========================================================================
// 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
Ancestors string // 祖级列表
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",
Ancestors: "ancestors",
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,128 @@
// ==========================================================================
// 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 // 性别[0:未知;1:男;2:女]
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,74 @@
// ==========================================================================
// 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,74 @@
// ==========================================================================
// 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,110 @@
// ==========================================================================
// 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
Name string // 菜单名称
Code string // 菜单编码
Icon string // 菜单图标
Type string // 菜单类型M目录 C菜单 F按钮
Perms string // 权限标识
Path string // 路由地址
Component string // 组件路径
Query string // 路由参数
IsFrame string // 是否内嵌
IsCache string // 是否不缓存
IsVisible string // 是否隐藏
Remark string // 备注
Level string // 级别
Tree string // 树
Sort string // 排序
Status string // 菜单状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// adminMenuColumns holds the columns for table hg_admin_menu.
var adminMenuColumns = AdminMenuColumns{
Id: "id",
Pid: "pid",
Name: "name",
Code: "code",
Icon: "icon",
Type: "type",
Perms: "perms",
Path: "path",
Component: "component",
Query: "query",
IsFrame: "is_frame",
IsCache: "is_cache",
IsVisible: "is_visible",
Remark: "remark",
Level: "level",
Tree: "tree",
Sort: "sort",
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,108 @@
// ==========================================================================
// 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"
)
// AdminMenuOldDao is the data access object for table hg_admin_menu_old.
type AdminMenuOldDao 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 AdminMenuOldColumns // columns contains all the column names of Table for convenient usage.
}
// AdminMenuOldColumns defines and stores column names for table hg_admin_menu_old.
type AdminMenuOldColumns struct {
Id string // 菜单ID
Pid string // 父菜单ID
Name string // 菜单名称
Icon string // 菜单图标
Type string // 菜单类型M目录 C菜单 F按钮
Perms string // 权限标识
Path string // 路由地址
Component string // 组件路径
Query string // 路由参数
IsFrame string // 是否为外链0是 1否
IsCache string // 是否缓存0缓存 1不缓存
IsVisible string // 菜单状态0显示 1隐藏
Remark string // 备注
Level string // 级别
Tree string // 树
Sort string // 排序
Status string // 菜单状态
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// adminMenuOldColumns holds the columns for table hg_admin_menu_old.
var adminMenuOldColumns = AdminMenuOldColumns{
Id: "id",
Pid: "pid",
Name: "name",
Icon: "icon",
Type: "type",
Perms: "perms",
Path: "path",
Component: "component",
Query: "query",
IsFrame: "is_frame",
IsCache: "is_cache",
IsVisible: "is_visible",
Remark: "remark",
Level: "level",
Tree: "tree",
Sort: "sort",
Status: "status",
CreatedAt: "created_at",
UpdatedAt: "updated_at",
}
// NewAdminMenuOldDao creates and returns a new DAO object for table data access.
func NewAdminMenuOldDao() *AdminMenuOldDao {
return &AdminMenuOldDao{
group: "default",
table: "hg_admin_menu_old",
columns: adminMenuOldColumns,
}
}
// DB retrieves and returns the underlying raw database management object of current DAO.
func (dao *AdminMenuOldDao) DB() gdb.DB {
return g.DB(dao.group)
}
// Table returns the table name of current dao.
func (dao *AdminMenuOldDao) Table() string {
return dao.table
}
// Columns returns all column names of current dao.
func (dao *AdminMenuOldDao) Columns() AdminMenuOldColumns {
return dao.columns
}
// Group returns the configuration group name of database of current dao.
func (dao *AdminMenuOldDao) Group() string {
return dao.group
}
// Ctx creates and returns the Model for current DAO, It automatically sets the context for current operation.
func (dao *AdminMenuOldDao) 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 *AdminMenuOldDao) 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,86 @@
// ==========================================================================
// 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 // 公告内容
Remark 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",
Remark: "remark",
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,86 @@
// ==========================================================================
// 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,92 @@
// ==========================================================================
// 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,74 @@
// ==========================================================================
// 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,74 @@
// ==========================================================================
// 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,88 @@
// ==========================================================================
// 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
Name string // 参数名称
Key string // 参数键名
Value string // 参数键值
IsDefault string // 是否默认
Status string // 状态
Remark string // 备注
CreatedAt string // 创建时间
UpdatedAt string // 更新时间
}
// sysConfigColumns holds the columns for table hg_sys_config.
var sysConfigColumns = SysConfigColumns{
Id: "id",
Name: "name",
Key: "key",
Value: "value",
IsDefault: "is_default",
Status: "status",
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: "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,92 @@
// ==========================================================================
// 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,86 @@
// ==========================================================================
// 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 // 字典主键
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",
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,116 @@
// ==========================================================================
// 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,94 @@
// ==========================================================================
// 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 // 排序
}
// 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",
}
// 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)
}

View File

@@ -0,0 +1,58 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/bufanyun/hotgo/app/consts"
"github.com/bufanyun/hotgo/app/model/entity"
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
"github.com/gogf/gf/v2/errors/gerror"
)
// sysConfigDao is the data access object for table hg_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 hg_sys_config operations.
SysConfig = sysConfigDao{
internal.NewSysConfigDao(),
}
)
//
//  @Title  判断名称是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   name
//  @Return  bool
//  @Return  error
//
func (dao *sysConfigDao) IsUniqueName(ctx context.Context, id int64, name string) (bool, error) {
var data *entity.SysConfig
m := dao.Ctx(ctx).Where("name", name)
if id > 0 {
m = m.WhereNot("id", id)
}
if err := m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
// Fill with you ideas below.

View File

@@ -0,0 +1,62 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/bufanyun/hotgo/app/consts"
"github.com/bufanyun/hotgo/app/model/entity"
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
"github.com/gogf/gf/v2/errors/gerror"
)
// sysDictDataDao is the data access object for table hg_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 hg_sys_dict_data operations.
SysDictData = sysDictDataDao{
internal.NewSysDictDataDao(),
}
)
//
//  @Title  判断字典类型是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   dictType
//  @Return  bool
//  @Return  error
//
func (dao *sysDictDataDao) IsUnique(ctx context.Context, id int64, dictType string, dictValue string) (bool, error) {
var (
data *entity.SysDictData
err error
)
m := dao.Ctx(ctx).Where("type", dictType).Where("value", dictValue)
if id > 0 {
m = m.WhereNot("id", id)
}
if err = m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
// Fill with you ideas below.

View File

@@ -0,0 +1,62 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/bufanyun/hotgo/app/consts"
"github.com/bufanyun/hotgo/app/model/entity"
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
"github.com/gogf/gf/v2/errors/gerror"
)
// sysDictTypeDao is the data access object for table hg_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 hg_sys_dict_type operations.
SysDictType = sysDictTypeDao{
internal.NewSysDictTypeDao(),
}
)
//
//  @Title  判断字典类型是否唯一
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   id
//  @Param   dictType
//  @Return  bool
//  @Return  error
//
func (dao *sysDictTypeDao) IsUnique(ctx context.Context, id int64, dictType string) (bool, error) {
var (
data *entity.SysDictType
err error
)
m := dao.Ctx(ctx).Where("type", dictType)
if id > 0 {
m = m.WhereNot("id", id)
}
if err = m.Scan(&data); err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return false, err
}
if data == nil {
return true, nil
}
return false, nil
}
// Fill with you ideas below.

View 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/bufanyun/hotgo/app/service/internal/dao/internal"
)
// sysLogDao is the data access object for table hg_sys_log.
// You can define custom methods on it to extend its functionality as you wish.
type sysLogDao struct {
*internal.SysLogDao
}
var (
// SysLog is globally public accessible object for table hg_sys_log operations.
SysLog = sysLogDao{
internal.NewSysLogDao(),
}
)
// Fill with you ideas below.

View File

@@ -0,0 +1,73 @@
// =================================================================================
// This is auto-generated by GoFrame CLI tool only once. Fill this file as you wish.
// =================================================================================
package dao
import (
"context"
"github.com/bufanyun/hotgo/app/consts"
"github.com/bufanyun/hotgo/app/service/internal/dao/internal"
"github.com/gogf/gf/v2/container/gvar"
"github.com/gogf/gf/v2/errors/gerror"
)
// sysProvincesDao is the data access object for table hg_sys_provinces.
// You can define custom methods on it to extend its functionality as you wish.
type sysProvincesDao struct {
*internal.SysProvincesDao
}
var (
// SysProvinces is globally public accessible object for table hg_sys_provinces operations.
SysProvinces = sysProvincesDao{
internal.NewSysProvincesDao(),
}
)
//
//  @Title  获取省市编码对应的地区名称
//  @Description
//  @Author  Ms <133814250@qq.com>
//  @Param   ctx
//  @Param   province
//  @Param   city
//  @Param   spilt
//  @Return  string
//  @Return  error
//
func (dao *sysProvincesDao) GetRegion(ctx context.Context, province int, city int, spilt ...string) (string, error) {
var (
provinceName *gvar.Var
cityName *gvar.Var
err error
)
// TODO  默认分隔符
spiltSymbol := "-"
if len(spilt) > 0 {
spiltSymbol = spilt[0]
}
if province > 0 {
provinceName, err = dao.Ctx(ctx).Where("id", province).Fields("title").Value()
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return "", err
}
if city > 0 {
cityName, err = dao.Ctx(ctx).Where("id", city).Fields("title").Value()
if err != nil {
err = gerror.Wrap(err, consts.ErrorORM)
return "", err
}
}
} else {
return "内网IP", nil
}
return provinceName.String() + spiltSymbol + cityName.String(), nil
}
// Fill with you ideas below.

View File

@@ -0,0 +1,28 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// AdminDept is the golang structure of table hg_admin_dept for DAO operations like Where/Data.
type AdminDept struct {
g.Meta `orm:"table:hg_admin_dept, dto:true"`
Id interface{} // 部门id
Pid interface{} // 父部门id
Ancestors interface{} // 祖级列表
Name interface{} // 部门名称
Code interface{} // 部门编码
Type interface{} // 部门类型
Leader interface{} // 负责人
Phone interface{} // 联系电话
Email interface{} // 邮箱
Sort interface{} // 排序
Status interface{} // 部门状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,44 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// AdminMember is the golang structure of table hg_admin_member for DAO operations like Where/Data.
type AdminMember struct {
g.Meta `orm:"table:hg_admin_member, dto:true"`
Id interface{} //
DeptId interface{} // 部门ID
Username interface{} // 帐号
PasswordHash interface{} // 密码
Salt interface{} // 密码盐
AuthKey interface{} // 授权令牌
PasswordResetToken interface{} // 密码重置令牌
Type interface{} // 1:普通管理员;10超级管理员
Realname interface{} // 真实姓名
Avatar interface{} // 头像
Sex interface{} // 性别[0:未知;1:男;2:女]
Qq interface{} // qq
Email interface{} // 邮箱
Birthday *gtime.Time // 生日
ProvinceId interface{} // 省
CityId interface{} // 城市
AreaId interface{} // 地区
Address interface{} // 默认地址
Mobile interface{} // 手机号码
HomePhone interface{} // 家庭号码
DingtalkRobotToken interface{} // 钉钉机器人token
VisitCount interface{} // 访问次数
LastTime interface{} // 最后一次登录时间
LastIp interface{} // 最后一次登录ip
Role interface{} // 权限
Remark interface{} // 备注
Status interface{} // 状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
)
// AdminMemberPost is the golang structure of table hg_admin_member_post for DAO operations like Where/Data.
type AdminMemberPost struct {
g.Meta `orm:"table:hg_admin_member_post, dto:true"`
MemberId interface{} // 用户ID
PostId interface{} // 岗位ID
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
)
// AdminMemberRole is the golang structure of table hg_admin_member_role for DAO operations like Where/Data.
type AdminMemberRole struct {
g.Meta `orm:"table:hg_admin_member_role, dto:true"`
MemberId interface{} // 用户ID
RoleId interface{} // 角色ID
}

View File

@@ -0,0 +1,35 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// AdminMenu is the golang structure of table hg_admin_menu for DAO operations like Where/Data.
type AdminMenu struct {
g.Meta `orm:"table:hg_admin_menu, dto:true"`
Id interface{} // 菜单ID
Pid interface{} // 父菜单ID
Name interface{} // 菜单名称
Code interface{} // 菜单编码
Icon interface{} // 菜单图标
Type interface{} // 菜单类型M目录 C菜单 F按钮
Perms interface{} // 权限标识
Path interface{} // 路由地址
Component interface{} // 组件路径
Query interface{} // 路由参数
IsFrame interface{} // 是否内嵌
IsCache interface{} // 是否不缓存
IsVisible interface{} // 是否隐藏
Remark interface{} // 备注
Level interface{} // 级别
Tree interface{} // 树
Sort interface{} // 排序
Status interface{} // 菜单状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,34 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// AdminMenuOld is the golang structure of table hg_admin_menu_old for DAO operations like Where/Data.
type AdminMenuOld struct {
g.Meta `orm:"table:hg_admin_menu_old, dto:true"`
Id interface{} // 菜单ID
Pid interface{} // 父菜单ID
Name interface{} // 菜单名称
Icon interface{} // 菜单图标
Type interface{} // 菜单类型M目录 C菜单 F按钮
Perms interface{} // 权限标识
Path interface{} // 路由地址
Component interface{} // 组件路径
Query interface{} // 路由参数
IsFrame interface{} // 是否为外链0是 1否
IsCache interface{} // 是否缓存0缓存 1不缓存
IsVisible interface{} // 菜单状态0显示 1隐藏
Remark interface{} // 备注
Level interface{} // 级别
Tree interface{} // 树
Sort interface{} // 排序
Status interface{} // 菜单状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// AdminNotice is the golang structure of table hg_admin_notice for DAO operations like Where/Data.
type AdminNotice struct {
g.Meta `orm:"table:hg_admin_notice, dto:true"`
Id interface{} // 公告ID
Title interface{} // 公告标题
Type interface{} // 公告类型1通知 2公告
Content interface{} // 公告内容
Remark interface{} // 备注
Status interface{} // 公告状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// AdminPost is the golang structure of table hg_admin_post for DAO operations like Where/Data.
type AdminPost struct {
g.Meta `orm:"table:hg_admin_post, dto:true"`
Id interface{} // 岗位ID
Code interface{} // 岗位编码
Name interface{} // 岗位名称
Remark interface{} // 备注
Sort interface{} // 显示顺序
Status interface{} // 状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,26 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// AdminRole is the golang structure of table hg_admin_role for DAO operations like Where/Data.
type AdminRole struct {
g.Meta `orm:"table:hg_admin_role, dto:true"`
Id interface{} // 角色ID
Name interface{} // 角色名称
Key interface{} // 角色权限字符串
DataScope interface{} // 数据范围1全部数据权限 2自定数据权限 3本部门数据权限 4本部门及以下数据权限
MenuCheckStrictly interface{} // 菜单树选择项是否关联显示
DeptCheckStrictly interface{} // 部门树选择项是否关联显示
Remark interface{} // 备注
Sort interface{} // 排序
Status interface{} // 角色状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
)
// AdminRoleDept is the golang structure of table hg_admin_role_dept for DAO operations like Where/Data.
type AdminRoleDept struct {
g.Meta `orm:"table:hg_admin_role_dept, dto:true"`
RoleId interface{} // 角色ID
DeptId interface{} // 部门ID
}

View File

@@ -0,0 +1,16 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
)
// AdminRoleMenu is the golang structure of table hg_admin_role_menu for DAO operations like Where/Data.
type AdminRoleMenu struct {
g.Meta `orm:"table:hg_admin_role_menu, dto:true"`
RoleId interface{} // 角色ID
MenuId interface{} // 菜单ID
}

View File

@@ -0,0 +1,24 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysConfig is the golang structure of table hg_sys_config for DAO operations like Where/Data.
type SysConfig struct {
g.Meta `orm:"table:hg_sys_config, dto:true"`
Id interface{} // 配置ID
Name interface{} // 参数名称
Key interface{} // 参数键名
Value interface{} // 参数键值
IsDefault interface{} // 是否默认
Status interface{} // 状态
Remark interface{} // 备注
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,26 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysDictData is the golang structure of table hg_sys_dict_data for DAO operations like Where/Data.
type SysDictData struct {
g.Meta `orm:"table:hg_sys_dict_data, dto:true"`
Id interface{} // 字典编码
Label interface{} // 字典标签
Value interface{} // 字典键值
Type interface{} // 字典类型
ListClass interface{} // 表格回显样式
IsDefault interface{} // 是否默认
Sort interface{} // 字典排序
Remark interface{} // 备注
Status interface{} // 状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,23 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysDictType is the golang structure of table hg_sys_dict_type for DAO operations like Where/Data.
type SysDictType struct {
g.Meta `orm:"table:hg_sys_dict_type, dto:true"`
Id interface{} // 字典主键
Name interface{} // 字典名称
Type interface{} // 字典类型
Sort interface{} // 排序
Remark interface{} // 备注
Status interface{} // 状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 更新时间
}

View File

@@ -0,0 +1,38 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
"github.com/gogf/gf/v2/os/gtime"
)
// SysLog is the golang structure of table hg_sys_log for DAO operations like Where/Data.
type SysLog struct {
g.Meta `orm:"table:hg_sys_log, dto:true"`
Id interface{} //
AppId interface{} // 应用id
MerchantId interface{} // 商户id
MemberId interface{} // 用户id
Method interface{} // 提交类型
Module interface{} // 模块
Url interface{} // 提交url
GetData interface{} // get数据
PostData interface{} // post数据
HeaderData interface{} // header数据
Ip interface{} // ip地址
ProvinceId interface{} // 省编码
CityId interface{} // 市编码
ErrorCode interface{} // 报错code
ErrorMsg interface{} // 报错信息
ErrorData interface{} // 报错日志
ReqId interface{} // 对外id
Timestamp interface{} // 响应时间
UserAgent interface{} // UA信息
TakeUpTime interface{} // 请求耗时
Status interface{} // 状态
CreatedAt *gtime.Time // 创建时间
UpdatedAt *gtime.Time // 修改时间
}

View File

@@ -0,0 +1,26 @@
// =================================================================================
// Code generated by GoFrame CLI tool. DO NOT EDIT.
// =================================================================================
package dto
import (
"github.com/gogf/gf/v2/frame/g"
)
// SysProvinces is the golang structure of table hg_sys_provinces for DAO operations like Where/Data.
type SysProvinces struct {
g.Meta `orm:"table:hg_sys_provinces, dto:true"`
Id interface{} // ID
Title interface{} // 栏目名
Pid interface{} // 父栏目
ShortTitle interface{} // 缩写
Areacode interface{} // 区域编码
Zipcode interface{} // 邮政编码
Pinyin interface{} // 拼音
Lng interface{} // 经度
Lat interface{} // 纬度
Level interface{} // 级别
Tree interface{} //
Sort interface{} // 排序
}