model

package
v0.0.7 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

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 BaseSysConf

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

BaseSysConf mapped from table <base_sys_conf>

func (*BaseSysConf) TableName

func (*BaseSysConf) TableName() string

TableName BaseSysConf's table name

type BaseSysDepartment

type BaseSysDepartment struct {
	*cool.Model
	Name     string `gorm:"column:name;type:varchar(255);not null" json:"name"` // 部门名称
	ParentID *int64 `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"`
	Table string `gorm:"index;not null" json:"table"`
	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 {
	*cool.Model
	UserID *int64  `gorm:"column:userId;type:bigint;index:IDX_51a2caeb5713efdfcb343a8772,priority:1" json:"userId"`                // 用户ID
	Action string  `gorm:"column:action;type:varchar(100);not null;index:IDX_938f886fb40e163db174b7f6c3,priority:1" json:"action"` // 行为
	IP     *string `gorm:"column:ip;type:varchar(50);index:IDX_24e18767659f8c7142580893f2,priority:1" json:"ip"`                   // ip
	IPAddr *string `gorm:"column:ipAddr;type:varchar(50);index:IDX_a03a27f75cf8d502b3060823e1,priority:1" json:"ipAddr"`           // ip地址
	Params *string `gorm:"column:params;type:text" json:"params"`                                                                  // 参数
}

BaseSysLog mapped from table <base_sys_log>

func (*BaseSysLog) TableName

func (*BaseSysLog) TableName() string

TableName BaseSysLog's table name

type BaseSysMenu

type BaseSysMenu struct {
	*cool.Model
	ParentID  *int64  `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;type:tinyint;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" json:"orderNum"`                 // 排序
	ViewPath  *string `gorm:"column:viewPath;type:varchar(255)" json:"viewPath"`                 // 视图地址
	KeepAlive *int32  `gorm:"column:keepAlive;type:tinyint;not null;default:1" json:"keepAlive"` // 路由缓存
	IsShow    *int32  `gorm:"column:isShow;type:tinyint;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 {
	*cool.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;type:tinyint;not null" 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 {
	*cool.Model
	UserID    string  `gorm:"column:userId;type:varchar(255);not null" json:"userId"`                                                   // 用户ID
	Name      string  `gorm:"column:name;type:varchar(255);not null;uniqueIndex:IDX_469d49a5998170e9550cf113da,priority:1" json:"name"` // 名称
	Label     *string `gorm:"column:label;type:varchar(50);uniqueIndex: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 {
	*cool.Model
	RoleID       int64 `gorm:"column:roleId;type:bigint;not null" json:"roleId"`             // 角色ID
	DepartmentID int64 `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 {
	*cool.Model
	RoleID int64 `gorm:"column:roleId;type:bigint;not null" json:"roleId"` // 角色ID
	MenuID int64 `gorm:"column:menuId;type:bigint;not null" json:"menuId"` // 菜单ID
}

BaseSysRoleMenu mapped from table <base_sys_role_menu>

func (*BaseSysRoleMenu) TableName

func (*BaseSysRoleMenu) TableName() string

TableName BaseSysRoleMenu's table name

type BaseSysUser

type BaseSysUser struct {
	*cool.Model
	DepartmentID *int64  `gorm:"column:departmentId;type:bigint;index:IDX_0cf944da378d70a94f5fefd803,priority:1" json:"departmentId"`              // 部门ID
	Name         *string `gorm:"column:name;type:varchar(255)" json:"name"`                                                                        // 姓名
	Username     string  `gorm:"column:username;type:varchar(100);not null;uniqueIndex:IDX_469ad55973f5b98930f6ad627b,priority:1" 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:IDX_9ec6d7ac6337eafb070e4881a8,priority:1" json:"phone"`                       // 手机
	Email        *string `gorm:"column:email;type:varchar(255)" json:"email"`                                                                      // 邮箱
	Status       *int32  `gorm:"column:status;type:tinyint;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 {
	*cool.Model
	UserID int64 `gorm:"column:userId;type:bigint;not null" json:"userId"` // 用户ID
	RoleID int64 `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

type Eps

type Eps struct {
	gmeta.Meta `group:"default" tableName:"base_eps"`
	cool.Model
	Module  string `json:"module" field:"module"`
	Method  string // 请求方法 例如:GET
	Path    string // 请求路径 例如:/welcome
	Prefix  string // 路由前缀 例如:/admin/base/open
	Summary string // 描述 例如:欢迎页面
	Tag     string // 标签 例如:base  好像暂时不用
	Dts     string // 未知 例如:{} 好像暂时不用
}

func NewEps

func NewEps() *Eps

NewEps 创建一个新的Eps实例

func (Eps) TableName

func (Eps) TableName() string

定义表名

Jump to

Keyboard shortcuts

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