models

package
v0.0.0-...-a5c2be1 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Permission

type Permission struct {
	Id          int       `gorm:"type:int unsigned auto_increment;primary_key"`
	Title       string    `gorm:"type:varchar(50);default:'';not null;comment:'权限'"`
	Description string    `gorm:"type:varchar(50);default:'';not null;comment:'描述'"`
	Seq         int       `gorm:"type:int;default:0;not null;comment:'排序'"`
	Status      int       `gorm:"type:tinyint;default:0;not null;comment:'状态'"`
	CreateTime  time.Time `gorm:"type:timestamp;default:current_timestamp;not null"`
	UpdateTime  time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"`
}

func (Permission) TableName

func (Permission) TableName() string

type Role

type Role struct {
	Id          int       `gorm:"type:int unsigned auto_increment;primary_key"`
	Title       string    `gorm:"type:varchar(50);default:'';not null;comment:'角色'"`
	Description string    `gorm:"type:varchar(50);default:'';not null;comment:'描述'"`
	Seq         int       `gorm:"type:int;default:0;not null;comment:'排序'"`
	Status      int       `gorm:"type:tinyint;default:0;not null;comment:'状态'"`
	CreateTime  time.Time `gorm:"type:timestamp;default:current_timestamp;not null"`
	UpdateTime  time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"`
}

func (Role) TableName

func (Role) TableName() string

type RolePermission

type RolePermission struct {
	RoleId       int       `gorm:"type:int unsigned;primary_key;auto_increment:false"`
	PermissionId int       `gorm:"type:int unsigned;primary_key;auto_increment:false"`
	Status       int       `gorm:"type:tinyint;default:0;not null;comment:'状态'"`
	CreateTime   time.Time `gorm:"type:timestamp;default:current_timestamp;not null"`
	UpdateTime   time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"`
}

func (RolePermission) TableName

func (RolePermission) TableName() string

type User

type User struct {
	Id            int       `gorm:"type:int unsigned auto_increment;primary_key"`
	Account       string    `gorm:"type:varchar(50);default:'';not null;comment:'账号'"`
	Name          string    `gorm:"type:varchar(50);default:'';not null;comment:'姓名'"`
	Status        int       `gorm:"type:tinyint;default:0;not null;comment:'状态'"`
	AccessToken   string    `gorm:"type:varchar(1000);default:'';not null;comment:'token'"`
	TokenExpireAt int64     `gorm:"type:int;default:'';not null;comment:'token过期时间'"`
	CreateTime    time.Time `gorm:"type:timestamp;default:current_timestamp;not null"`
	UpdateTime    time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"`
}

func (User) TableName

func (User) TableName() string

type UserRole

type UserRole struct {
	UserId     int       `gorm:"type:int unsigned;primary_key;auto_increment:false"`
	RoleId     int       `gorm:"type:int unsigned;primary_key;auto_increment:false"`
	Status     int       `gorm:"type:tinyint;default:0;not null;comment:'状态'"`
	CreateTime time.Time `gorm:"type:timestamp;default:current_timestamp;not null"`
	UpdateTime time.Time `gorm:"type:timestamp;default:current_timestamp on update current_timestamp;not null"`
}

func (UserRole) TableName

func (UserRole) TableName() string

Jump to

Keyboard shortcuts

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