model

package
v0.0.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 30, 2023 License: MIT Imports: 1 Imported by: 2

Documentation

Index

Constants

View Source
const TableNameBaseEpsAdmin = "base_eps_admin"
View Source
const TableNameBaseEpsApp = "base_eps_app"
View Source
const TableNameBaseSysConf = "base_sys_conf"
View Source
const TableNameBaseSysDepartment = "base_sys_department"
View Source
const TableNameBaseSysInit = "base_sys_init"
View Source
const TableNameBaseSysLog = "base_sys_log"
View Source
const TableNameBaseSysMenu = "base_sys_menu"
View Source
const TableNameBaseSysParam = "base_sys_param"
View Source
const TableNameBaseSysRole = "base_sys_role"
View Source
const TableNameBaseSysRoleDepartment = "base_sys_role_department"
View Source
const TableNameBaseSysRoleMenu = "base_sys_role_menu"
View Source
const TableNameBaseSysUser = "base_sys_user"
View Source
const TableNameBaseSysUserRole = "base_sys_user_role"

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseEpsAdmin

type BaseEpsAdmin struct {
	Id      int    `json:"id"`
	Module  string `json:"module" field:"module"`
	Method  string // 请求方法 例如:GET
	Path    string // 请求路径 例如:/welcome
	Prefix  string // 路由前缀 例如:/admin/base/open
	Summary string // 描述 例如:欢迎页面
	Tag     string // 标签 例如:base  好像暂时不用
	Dts     string // 未知 例如:{} 好像暂时不用
}

BaseEpsAdmin mapped from table <base_eps_admin>

func NewBaseEpsAdmin

func NewBaseEpsAdmin() *BaseEpsAdmin

NewBaseEpsAdmin create a new BaseEpsAdmin

func (*BaseEpsAdmin) GroupName

func (*BaseEpsAdmin) GroupName() string

GroupName BaseEpsAdmin's table group

func (*BaseEpsAdmin) TableName

func (*BaseEpsAdmin) TableName() string

TableName BaseEpsAdmin's table name

type BaseEpsApp

type BaseEpsApp struct {
	Id      int    `json:"id"`
	Module  string `json:"module" field:"module"`
	Method  string // 请求方法 例如:GET
	Path    string // 请求路径 例如:/welcome
	Prefix  string // 路由前缀 例如:/admin/base/open
	Summary string // 描述 例如:欢迎页面
	Tag     string // 标签 例如:base  好像暂时不用
	Dts     string // 未知 例如:{} 好像暂时不用
}

BaseEpsApp mapped from table <base_eps_app>

func NewBaseEpsApp

func NewBaseEpsApp() *BaseEpsApp

NewBaseEpsApp create a new BaseEpsApp

func (*BaseEpsApp) GroupName

func (*BaseEpsApp) GroupName() string

GroupName BaseEpsApp's table group

func (*BaseEpsApp) TableName

func (*BaseEpsApp) TableName() string

TableName BaseEpsApp's table name

type BaseSysConf

type BaseSysConf struct {
	*dzhCore.Model
	CKey   string `gorm:"column:cKey;type:varchar(255);not null;index" json:"cKey"` // 配置键
	CValue string `gorm:"column:cValue;type:varchar(255);not null" json:"cValue"`   // 配置值
}

BaseSysConf mapped from table <base_sys_conf>

func NewBaseSysConf

func NewBaseSysConf() *BaseSysConf

NewBaseSysConf 创建实例

func (*BaseSysConf) TableName

func (*BaseSysConf) TableName() string

TableName BaseSysConf's table name

type BaseSysDepartment

type BaseSysDepartment struct {
	*dzhCore.Model
	Name     string `gorm:"column:name;type:varchar(255);not null" json:"name"` // 部门名称
	ParentID uint   `gorm:"column:parentId;type:bigint" json:"parentId"`        // 上级部门ID
	OrderNum int32  `gorm:"column:orderNum;type:int;not null" json:"orderNum"`  // 排序
}

BaseSysDepartment mapped from table <base_sys_department>

func NewBaseSysDepartment

func NewBaseSysDepartment() *BaseSysDepartment

NewBaseSysDepartment 创建一个BaseSysDepartment实例

func (*BaseSysDepartment) TableName

func (*BaseSysDepartment) TableName() string

TableName BaseSysDepartment's table name

type BaseSysInit

type BaseSysInit struct {
	Id     uint   `gorm:"primaryKey" json:"id"`
	Module string `gorm:"index;not null" json:"module"`
	Tables string `gorm:"index;not null" json:"tables"`
	Group  string `gorm:"index;not null" json:"group"`
}

BaseSysInit mapped from table <base_sys_init>

func (*BaseSysInit) GetStruct

func (m *BaseSysInit) GetStruct() interface{}

GetStruct BaseSysInit's struct

func (*BaseSysInit) GroupName

func (*BaseSysInit) GroupName() string

TableGroup BaseSysInit's table group

func (*BaseSysInit) TableName

func (*BaseSysInit) TableName() string

TableName BaseSysInit's table namer

type BaseSysLog

type BaseSysLog struct {
	*dzhCore.Model
	UserID uint   `gorm:"column:userId;index:IDX_51a2caeb5713efdfcb343a8772,priority:1" json:"userId"`          // 用户ID
	Action string `gorm:"column:action;not null;index:IDX_938f886fb40e163db174b7f6c3,priority:1" json:"action"` // 行为
	IP     string `gorm:"column:ip;index:IDX_24e18767659f8c7142580893f2,priority:1" json:"ip"`                  // ip
	IPAddr string `gorm:"column:ipAddr;index:IDX_a03a27f75cf8d502b3060823e1,priority:1" json:"ipAddr"`          // ip地址
	Params string `gorm:"column:params" json:"params"`                                                          // 参数
}

BaseSysLog mapped from table <base_sys_log>

func NewBaseSysLog

func NewBaseSysLog() *BaseSysLog

NewBaseSysLog 创建实例

func (*BaseSysLog) TableName

func (*BaseSysLog) TableName() string

TableName BaseSysLog's table name

type BaseSysMenu

type BaseSysMenu struct {
	*dzhCore.Model
	ParentID  uint    `gorm:"column:parentId;type:bigint" json:"parentId"`                 // 父菜单ID
	Name      string  `gorm:"column:name;type:varchar(255);not null" json:"name"`          // 菜单名称
	Router    *string `gorm:"column:router;type:varchar(255)" json:"router"`               // 菜单地址
	Perms     *string `gorm:"column:perms;type:varchar(255)" json:"perms"`                 // 权限标识
	Type      int32   `gorm:"column:type;not null" json:"type"`                            // 类型 0:目录 1:菜单 2:按钮
	Icon      *string `gorm:"column:icon;type:varchar(255)" json:"icon"`                   // 图标
	OrderNum  int32   `gorm:"column:orderNum;type:int;not null;default:0" json:"orderNum"` // 排序
	ViewPath  *string `gorm:"column:viewPath;type:varchar(255)" json:"viewPath"`           // 视图地址
	KeepAlive *int32  `gorm:"column:keepAlive;not null;default:1" json:"keepAlive"`        // 路由缓存
	IsShow    *int32  `gorm:"column:isShow;not null;default:1" json:"isShow"`              // 是否显示
}

BaseSysMenu mapped from table <base_sys_menu>

func NewBaseSysMenu

func NewBaseSysMenu() *BaseSysMenu

NewBaseSysMenu create a new BaseSysMenu

func (*BaseSysMenu) TableName

func (*BaseSysMenu) TableName() string

TableName BaseSysMenu's table name

type BaseSysParam

type BaseSysParam struct {
	*dzhCore.Model
	KeyName  string  `gorm:"column:keyName;type:varchar(255);not null;index:IDX_cf19b5e52d8c71caa9c4534454,priority:1" json:"keyName"` // 键位
	Name     string  `gorm:"column:name;type:varchar(255);not null" json:"name"`                                                       // 名称
	Data     string  `gorm:"column:data;type:text;not null" json:"data"`                                                               // 数据
	DataType int32   `gorm:"column:dataType;not null;default:0" json:"dataType"`                                                       // 数据类型 0:字符串 1:数组 2:键值对
	Remark   *string `gorm:"column:remark;type:varchar(255)" json:"remark"`                                                            // 备注
}

BaseSysParam mapped from table <base_sys_param>

func NewBaseSysParam

func NewBaseSysParam() *BaseSysParam

NewBaseSysParam 创建一个新的BaseSysParam

func (*BaseSysParam) TableName

func (*BaseSysParam) TableName() string

TableName BaseSysParam's table name

type BaseSysRole

type BaseSysRole struct {
	*dzhCore.Model
	UserID    string  `gorm:"column:userId;type:varchar(255);not null" json:"userId"`                                             // 用户ID
	Name      string  `gorm:"column:name;type:varchar(255);not null;index:IDX_469d49a5998170e9550cf113da,priority:1" json:"name"` // 名称
	Label     *string `gorm:"column:label;type:varchar(50);index:IDX_f3f24fbbccf00192b076e549a7,priority:1" json:"label"`         // 角色标签
	Remark    *string `gorm:"column:remark;type:varchar(255)" json:"remark"`                                                      // 备注
	Relevance *int32  `gorm:"column:relevance;type:int;not null;default:1" json:"relevance"`                                      // 数据权限是否关联上下级
}

BaseSysRole mapped from table <base_sys_role>

func NewBaseSysRole

func NewBaseSysRole() *BaseSysRole

NewBaseSysRole create a new BaseSysRole

func (*BaseSysRole) TableName

func (*BaseSysRole) TableName() string

TableName BaseSysRole's table name

type BaseSysRoleDepartment

type BaseSysRoleDepartment struct {
	*dzhCore.Model
	RoleID       uint `gorm:"column:roleId;type:bigint;not null" json:"roleId"`             // 角色ID
	DepartmentID uint `gorm:"column:departmentId;type:bigint;not null" json:"departmentId"` // 部门ID
}

BaseSysRoleDepartment mapped from table <base_sys_role_department>

func NewBaseSysRoleDepartment

func NewBaseSysRoleDepartment() *BaseSysRoleDepartment

NewBaseSysRoleDepartment create a new BaseSysRoleDepartment

func (*BaseSysRoleDepartment) TableName

func (*BaseSysRoleDepartment) TableName() string

TableName BaseSysRoleDepartment's table name

type BaseSysRoleMenu

type BaseSysRoleMenu struct {
	*dzhCore.Model
	RoleID uint `gorm:"column:roleId;type:bigint;not null" json:"roleId"` // 角色ID
	MenuID uint `gorm:"column:menuId;type:bigint;not null" json:"menuId"` // 菜单ID
}

BaseSysRoleMenu mapped from table <base_sys_role_menu>

func NewBaseSysRoleMenu

func NewBaseSysRoleMenu() *BaseSysRoleMenu

NewBaseSysRoleMenu create a new BaseSysRoleMenu

func (*BaseSysRoleMenu) TableName

func (*BaseSysRoleMenu) TableName() string

TableName BaseSysRoleMenu's table name

type BaseSysUser

type BaseSysUser struct {
	*dzhCore.Model
	DepartmentID uint    `gorm:"column:departmentId;type:bigint;index" json:"departmentId"`        // 部门ID
	Name         *string `gorm:"column:name;type:varchar(255)" json:"name"`                        // 姓名
	Username     string  `gorm:"column:username;type:varchar(100);not null;Index" json:"username"` // 用户名
	Password     string  `gorm:"column:password;type:varchar(255);not null" json:"password"`       // 密码
	PasswordV    *int32  `gorm:"column:passwordV;type:int;not null;default:1" json:"passwordV"`    // 密码版本, 作用是改完密码,让原来的token失效
	NickName     *string `gorm:"column:nickName;type:varchar(255)" json:"nickName"`                // 昵称
	HeadImg      *string `gorm:"column:headImg;type:varchar(255)" json:"headImg"`                  // 头像
	Phone        *string `gorm:"column:phone;type:varchar(20);index" json:"phone"`                 // 手机
	Email        *string `gorm:"column:email;type:varchar(255)" json:"email"`                      // 邮箱
	Status       *int32  `gorm:"column:status;not null;default:1" json:"status"`                   // 状态 0:禁用 1:启用
	Remark       *string `gorm:"column:remark;type:varchar(255)" json:"remark"`                    // 备注
	SocketID     *string `gorm:"column:socketId;type:varchar(255)" json:"socketId"`                // socketId
}

BaseSysUser mapped from table <base_sys_user>

func NewBaseSysUser

func NewBaseSysUser() *BaseSysUser

NewBaseSysUser 创建一个新的BaseSysUser

func (*BaseSysUser) TableName

func (*BaseSysUser) TableName() string

TableName BaseSysUser's table name

type BaseSysUserRole

type BaseSysUserRole struct {
	*dzhCore.Model
	UserID uint `gorm:"column:userId;type:bigint;not null" json:"userId"` // 用户ID
	RoleID uint `gorm:"column:roleId;type:bigint;not null" json:"roleId"` // 角色ID
}

BaseSysUserRole mapped from table <base_sys_user_role>

func NewBaseSysUserRole

func NewBaseSysUserRole() *BaseSysUserRole

NewBaseSysUserRole create a new BaseSysUserRole

func (*BaseSysUserRole) TableName

func (*BaseSysUserRole) TableName() string

TableName BaseSysUserRole's table name

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL