meta

package
v0.0.0-...-33f8601 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	ID       int64  `db:"id" db_default:"auto"`
	Name     string `db:"name"`
	Email    string `db:"email"`
	Token    string `db:"token" db_default:"''"`
	Comments string `db:"comments"`
	Ctime    string `db:"ctime" db_default:"now()"`
	Mtime    string `db:"mtime" db_default:"now()"`
}

App 应用表

type Resource

type Resource struct {
	ID       int64  `db:"id" db_default:"auto"`
	AppID    int64  `db:"app_id"`
	Name     string `db:"name"`
	Comments string `db:"comments"`
	Ctime    string `db:"ctime" db_default:"now()"`
	Mtime    string `db:"mtime" db_default:"now()"`
}

Resource 资源表

type Role

type Role struct {
	ID       int64  `db:"id" db_default:"auto"`
	AppID    int64  `db:"app_id"`
	Name     string `db:"name"`
	UserID   int64  `db:"user_id"`
	Comments string `db:"comments"`
	Ctime    string `db:"ctime" db_default:"now()"`
	Mtime    string `db:"mtime" db_default:"now()"`
}

Role 对应角色表

type RoleResource

type RoleResource struct {
	ID           int64  `db:"id" db_default:"auto"`
	AppID        int64  `db:"app_id"`
	ResourceID   int64  `db:"resource_id"`
	ResourceName string `db:"resource.name" db_default:""`
	RoleID       int64  `db:"role_id"`
	RoleName     string `db:"role.name" db_default:""`
	RoleComments string `db:"role.comments" db_default:""`
	Ctime        string `db:"ctime" db_default:"now()"`
	Mtime        string `db:"mtime" db_default:"now()"`
}

RoleResource 角色与资源关联表.

type RoleUser

type RoleUser struct {
	ID           int64  `db:"id" db_default:"auto"`
	AppID        int64  `db:"app_id"`
	AdminID      int64  `db:"role.user_id"`
	UserID       int64  `db:"user_id"`
	UserName     string `db:"user.name"`
	UserEmail    string `db:"user.email"`
	RoleID       int64  `db:"role_id"`
	RoleName     string `db:"role.name"`
	RoleComments string `db:"role.comments"`
	Ctime        string `db:"ctime" db_default:"now()"`
	Mtime        string `db:"mtime" db_default:"now()"`
}

RoleUser 角色与用户关联表.

type User

type User struct {
	ID    int64  `db:"id" db_default:"auto"`
	AppID int64  `db:"app_id"`
	Name  string `db:"name"`
	Email string `db:"email"`
	Ctime string `db:"ctime" db_default:"now()"`
	Mtime string `db:"mtime" db_default:"now()"`
}

User 用户表.

type UserInfo

type UserInfo struct {
	ID    int64      `db:"id" db_default:"auto"`
	AppID int64      `db:"app_id"`
	Name  string     `db:"name"`
	Email string     `db:"email"`
	Res   []Resource `db_table:"one2more"`
	Roles []Role     `db_table:"one2more"`
	Ctime string     `db:"ctime" db_default:"now()"`
	Mtime string     `db:"mtime" db_default:"now()"`
}

UserInfo 用户信息.

Jump to

Keyboard shortcuts

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