model

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2021 License: MIT, Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameTPermission = "t_permission"
View Source
const TableNameTPlugin = "t_plugin"
View Source
const TableNameTUser = "t_user"
View Source
const TableNameTUserHasPermission = "t_user_has_permission"

Variables

This section is empty.

Functions

This section is empty.

Types

type TPermission

type TPermission struct {
	ID   int32  `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Name string `gorm:"column:name;not null" json:"name"`
	Flag string `gorm:"column:flag;not null" json:"flag"`
}

TPermission mapped from table <t_permission>

func (*TPermission) TableName

func (*TPermission) TableName() string

TableName TPermission's table name

type TPlugin

type TPlugin struct {
	ID         int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Name       string    `gorm:"column:name" json:"name"`                              // Name of plugin
	FilePath   string    `gorm:"column:file_path;not null" json:"file_path"`           // The plugin file path
	IsDelete   int32     `gorm:"column:is_delete;not null;default:0" json:"is_delete"` // 是否删除
	IsBoot     int32     `gorm:"column:is_boot;not null;default:0" json:"is_boot"`     // 是否跟随系统开机启动
	CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
	UpdateTime time.Time `gorm:"column:update_time;not null;default:CURRENT_TIMESTAMP" json:"update_time"`
}

TPlugin mapped from table <t_plugin>

func (*TPlugin) TableName

func (*TPlugin) TableName() string

TableName TPlugin's table name

type TUser

type TUser struct {
	ID         int32     `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Username   string    `gorm:"column:username;not null" json:"username"`
	Password   string    `gorm:"column:password;not null" json:"-"`
	Salt       string    `gorm:"column:salt" json:"-"`
	Avator     string    `gorm:"column:avator" json:"avator"`
	RealName   string    `gorm:"column:real_name" json:"real_name"`
	Mobile     string    `gorm:"column:mobile" json:"mobile"`
	Email      string    `gorm:"column:email" json:"email"`
	Sex        int32     `gorm:"column:sex;not null;default:0" json:"sex"`
	Status     int32     `gorm:"column:status;not null;default:0" json:"status"`
	CreateTime time.Time `gorm:"column:create_time;not null;default:CURRENT_TIMESTAMP" json:"create_time"`
	UpdateTime time.Time `gorm:"column:update_time;default:CURRENT_TIMESTAMP" json:"update_time"`
	ParentUser int32     `gorm:"column:parent_user;primaryKey;autoIncrement:false" json:"-"`
}

TUser mapped from table <t_user>

func (*TUser) TableName

func (*TUser) TableName() string

TableName TUser's table name

type TUserHasPermission

type TUserHasPermission struct {
	UserID       int32 `gorm:"column:t_user_id;primaryKey;autoIncrement:false" json:"user_id"`
	PermissionID int32 `gorm:"column:t_permission_id;primaryKey;autoIncrement:false" json:"permission_id"`
}

TUserHasPermission mapped from table <t_user_has_permission>

func (*TUserHasPermission) TableName

func (*TUserHasPermission) TableName() string

TableName TUserHasPermission's table name

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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