model

package
v0.0.0-...-9fe1ceb Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameSysLoginLog = "sys_login_log"
View Source
const TableNameSysMenu = "sys_menu"
View Source
const TableNameSysOperateLog = "sys_operate_log"
View Source
const TableNameSysRole = "sys_role"
View Source
const TableNameSysRoleMenu = "sys_role_menu"
View Source
const TableNameSysUser = "sys_user"
View Source
const TableNameSysUserRole = "sys_user_role"

Variables

This section is empty.

Functions

This section is empty.

Types

type SysLoginLog

type SysLoginLog struct {
	ID       int64  `gorm:"column:id;primaryKey;autoIncrement:true;comment:编号" json:"id"` // 编号
	UserName string `gorm:"column:user_name;not null;comment:用户名" json:"user_name"`       // 用户名
	Status   string ``                                                                    // 登录状态(online:在线,登录初始状态,方便统计在线人数;login:退出登录后将online置为login;logout:退出登录)
	/* 197-byte string literal not displayed */
	IP        string    `gorm:"column:ip;not null;comment:IP地址" json:"ip"`                                           // IP地址
	LoginTime time.Time `gorm:"column:login_time;not null;default:CURRENT_TIMESTAMP;comment:登陆时间" json:"login_time"` // 登陆时间
}

SysLoginLog 系统登录日志

func (*SysLoginLog) TableName

func (*SysLoginLog) TableName() string

TableName SysLoginLog's table name

type SysMenu

type SysMenu struct {
	ID         int64      `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`                          // 主键
	MenuName   string     `gorm:"column:menu_name;not null;comment:菜单名称" json:"menu_name"`                               // 菜单名称
	MenuType   int32      `gorm:"column:menu_type;not null;default:1;comment:菜单类型(1:目录   2:菜单   3:按钮)" json:"menu_type"` // 菜单类型(1:目录   2:菜单   3:按钮)
	StatusID   int32      `gorm:"column:status_id;not null;default:1;comment:状态(1:正常,0:禁用)" json:"status_id"`            // 状态(1:正常,0:禁用)
	Sort       int32      `gorm:"column:sort;not null;default:1;comment:排序" json:"sort"`                                 // 排序
	ParentID   int64      `gorm:"column:parent_id;not null;comment:父ID" json:"parent_id"`                                // 父ID
	MenuURL    *string    `gorm:"column:menu_url;comment:路由路径" json:"menu_url"`                                          // 路由路径
	APIURL     *string    `gorm:"column:api_url;comment:接口URL" json:"api_url"`                                           // 接口URL
	MenuIcon   *string    `gorm:"column:menu_icon;comment:菜单图标" json:"menu_icon"`                                        // 菜单图标
	Remark     *string    `gorm:"column:remark;comment:备注" json:"remark"`                                                // 备注
	CreateTime time.Time  `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"create_time"` // 创建时间
	UpdateTime *time.Time `gorm:"column:update_time;comment:修改时间" json:"update_time"`                                    // 修改时间
}

SysMenu 菜单信息

func (*SysMenu) TableName

func (*SysMenu) TableName() string

TableName SysMenu's table name

type SysOperateLog

type SysOperateLog struct {
	ID             int64      `gorm:"column:id;primaryKey;autoIncrement:true;comment:编号" json:"id"`                       // 编号
	UserName       string     `gorm:"column:user_name;not null;comment:用户名" json:"user_name"`                             // 用户名
	Operation      string     `gorm:"column:operation;not null;comment:用户操作" json:"operation"`                            // 用户操作
	Method         string     `gorm:"column:method;not null;comment:请求方法" json:"method"`                                  // 请求方法
	RequestParams  string     `gorm:"column:request_params;not null;comment:请求参数" json:"request_params"`                  // 请求参数
	ResponseParams *string    `gorm:"column:response_params;comment:响应参数" json:"response_params"`                         // 响应参数
	Time           int64      `gorm:"column:time;not null;comment:执行时长(毫秒)" json:"time"`                                  // 执行时长(毫秒)
	IP             *string    `gorm:"column:ip;comment:IP地址" json:"ip"`                                                   // IP地址
	OperationTime  *time.Time `gorm:"column:operation_time;default:CURRENT_TIMESTAMP;comment:操作时间" json:"operation_time"` // 操作时间
}

SysOperateLog 系统操作日志

func (*SysOperateLog) TableName

func (*SysOperateLog) TableName() string

TableName SysOperateLog's table name

type SysRole

type SysRole struct {
	ID         int64      `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`                          // 主键
	RoleName   string     `gorm:"column:role_name;not null;comment:名称" json:"role_name"`                                 // 名称
	StatusID   int32      `gorm:"column:status_id;not null;default:1;comment:状态(1:正常,0:禁用)" json:"status_id"`            // 状态(1:正常,0:禁用)
	Sort       int32      `gorm:"column:sort;not null;default:1;comment:排序" json:"sort"`                                 // 排序
	Remark     string     `gorm:"column:remark;not null;comment:备注" json:"remark"`                                       // 备注
	CreateTime time.Time  `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"create_time"` // 创建时间
	UpdateTime *time.Time `gorm:"column:update_time;comment:修改时间" json:"update_time"`                                    // 修改时间
}

SysRole 角色信息

func (*SysRole) TableName

func (*SysRole) TableName() string

TableName SysRole's table name

type SysRoleMenu

type SysRoleMenu struct {
	ID         int64      `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`                          // 主键
	RoleID     int64      `gorm:"column:role_id;not null;comment:角色ID" json:"role_id"`                                   // 角色ID
	MenuID     int64      `gorm:"column:menu_id;not null;comment:菜单ID" json:"menu_id"`                                   // 菜单ID
	CreateTime time.Time  `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"create_time"` // 创建时间
	UpdateTime *time.Time `gorm:"column:update_time;comment:修改时间" json:"update_time"`                                    // 修改时间
}

SysRoleMenu 菜单角色关联表

func (*SysRoleMenu) TableName

func (*SysRoleMenu) TableName() string

TableName SysRoleMenu's table name

type SysUser

type SysUser struct {
	ID         int64      `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`                          // 主键
	Mobile     string     `gorm:"column:mobile;not null;comment:手机" json:"mobile"`                                       // 手机
	UserName   string     `gorm:"column:user_name;not null;comment:姓名" json:"user_name"`                                 // 姓名
	Password   string     `gorm:"column:password;not null;comment:密码" json:"password"`                                   // 密码
	StatusID   int32      `gorm:"column:status_id;not null;default:1;comment:状态(1:正常,0:禁用)" json:"status_id"`            // 状态(1:正常,0:禁用)
	Sort       int32      `gorm:"column:sort;not null;default:1;comment:排序" json:"sort"`                                 // 排序
	Remark     *string    `gorm:"column:remark;comment:备注" json:"remark"`                                                // 备注
	CreateTime time.Time  `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"create_time"` // 创建时间
	UpdateTime *time.Time `gorm:"column:update_time;comment:修改时间" json:"update_time"`                                    // 修改时间
}

SysUser 用户信息

func (*SysUser) TableName

func (*SysUser) TableName() string

TableName SysUser's table name

type SysUserRole

type SysUserRole struct {
	ID         int64      `gorm:"column:id;primaryKey;autoIncrement:true;comment:主键" json:"id"`                          // 主键
	UserID     int64      `gorm:"column:user_id;not null;comment:用户ID" json:"user_id"`                                   // 用户ID
	RoleID     int64      `gorm:"column:role_id;not null;comment:角色ID" json:"role_id"`                                   // 角色ID
	CreateTime time.Time  `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP;comment:创建时间" json:"create_time"` // 创建时间
	UpdateTime *time.Time `gorm:"column:update_time;comment:修改时间" json:"update_time"`                                    // 修改时间
}

SysUserRole 角色用户关联表

func (*SysUserRole) TableName

func (*SysUserRole) TableName() string

TableName SysUserRole's table name

Jump to

Keyboard shortcuts

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