model

package
v0.0.0-...-a3cb3ec Latest Latest
Warning

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

Go to latest
Published: May 22, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const TableNameCasbinRule = "casbin_rule"
View Source
const TableNameDebugPerf = "debug_perf"
View Source
const TableNameMenu = "menu"
View Source
const TableNameSetting = "setting"
View Source
const TableNameUser = "user"

Variables

This section is empty.

Functions

This section is empty.

Types

type CasbinRule

type CasbinRule struct {
	ID         int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Ptype      string         `gorm:"column:ptype" json:"ptype"`
	V0         string         `gorm:"column:v0" json:"v0"`
	V1         string         `gorm:"column:v1" json:"v1"`
	V2         string         `gorm:"column:v2" json:"v2"`
	V3         string         `gorm:"column:v3" json:"v3"`
	V4         string         `gorm:"column:v4" json:"v4"`
	V5         string         `gorm:"column:v5" json:"v5"`
	Desc       string         `gorm:"column:desc;not null;comment:描述" json:"desc"`
	CreateAt   time.Time      `gorm:"column:create_at;not null;default:CURRENT_TIMESTAMP;comment:记录创建时间" json:"create_at"`
	UpdateAt   time.Time      `gorm:"column:update_at;not null;default:CURRENT_TIMESTAMP;comment:记录修改时间" json:"update_at"`
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	CreateUser string         `gorm:"column:create_user;not null;comment:创建人" json:"create_user"`
	UpdateUser string         `gorm:"column:update_user;not null;comment:修改人" json:"update_user"`
}

CasbinRule mapped from table <casbin_rule>

func (*CasbinRule) TableName

func (*CasbinRule) TableName() string

TableName CasbinRule's table name

type DebugPerf

type DebugPerf struct {
	ID         int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	UID        string         `gorm:"column:uid;not null;comment:uid" json:"uid"`
	Username   string         `gorm:"column:username;not null;comment:用户名" json:"username"`
	Motto      string         `gorm:"column:motto;not null;comment:座右铭" json:"motto"`
	Text       string         `gorm:"column:text;not null;comment:内容" json:"text"`
	CreateAt   time.Time      `gorm:"column:create_at;not null;default:CURRENT_TIMESTAMP;comment:记录创建时间" json:"create_at"`
	UpdateAt   time.Time      `gorm:"column:update_at;not null;default:CURRENT_TIMESTAMP;comment:记录修改时间" json:"update_at"`
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	CreateUser string         `gorm:"column:create_user;not null;comment:创建人" json:"create_user"`
	UpdateUser string         `gorm:"column:update_user;not null;comment:修改人" json:"update_user"`
}

DebugPerf mapped from table <debug_perf>

func (*DebugPerf) TableName

func (*DebugPerf) TableName() string

TableName DebugPerf's table name

type Menu struct {
	ID          int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	Path        string         `gorm:"column:path;not null;comment:路由" json:"path"`
	Name        string         `gorm:"column:name;not null;comment:名称" json:"name"`
	Redirect    string         `gorm:"column:redirect;not null;comment:重定向" json:"redirect"`
	Component   string         `gorm:"column:component;not null;comment:文件地址" json:"component"`
	ParentID    int32          `gorm:"column:parent_id;not null;comment:父id" json:"parent_id"`
	RoleIDGroup string         `gorm:"column:role_id_group;not null;comment:角色组" json:"role_id_group"`
	Title       string         `gorm:"column:title;not null;comment:标题" json:"title"`
	Icon        string         `gorm:"column:icon;not null;comment:图标" json:"icon"`
	Hidden      bool           `gorm:"column:hidden;not null;comment:是否隐藏" json:"hidden"`
	KeepAlive   bool           `gorm:"column:keep_alive;not null;default:1;comment:keepAlive" json:"keep_alive"`
	Sort        int32          `gorm:"column:sort;not null;comment:排序" json:"sort"`
	CreateAt    time.Time      `gorm:"column:create_at;not null;default:CURRENT_TIMESTAMP;comment:记录创建时间" json:"create_at"`
	UpdateAt    time.Time      `gorm:"column:update_at;not null;default:CURRENT_TIMESTAMP;comment:记录修改时间" json:"update_at"`
	DeletedAt   gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	CreateUser  string         `gorm:"column:create_user;not null;comment:创建人" json:"create_user"`
	UpdateUser  string         `gorm:"column:update_user;not null;comment:修改人" json:"update_user"`
}

Menu mapped from table <menu>

func (*Menu) TableName() string

TableName Menu's table name

type Setting

type Setting struct {
	ID                    int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	UID                   string         `gorm:"column:uid;not null;comment:uid" json:"uid"`
	Lang                  string         `gorm:"column:lang;not null;comment:语言" json:"lang"`
	SideModeColor         string         `gorm:"column:side_mode_color;not null;comment:侧边栏颜色" json:"side_mode_color"`
	Collapse              bool           `gorm:"column:collapse;not null;comment:侧边栏折叠" json:"collapse"`
	Breadcrumb            bool           `gorm:"column:breadcrumb;not null;default:1;comment:面包屑" json:"breadcrumb"`
	DefaultRouter         string         `gorm:"column:default_router;not null;comment:默认路由" json:"default_router"`
	ActiveTextColor       string         `gorm:"column:active_text_color;not null;comment:活跃文本颜色" json:"active_text_color"`
	ActiveBackgroundColor string         `gorm:"column:active_background_color;not null;comment:活跃文本背景色" json:"active_background_color"`
	CreateAt              time.Time      `gorm:"column:create_at;not null;default:CURRENT_TIMESTAMP;comment:记录创建时间" json:"create_at"`
	UpdateAt              time.Time      `gorm:"column:update_at;not null;default:CURRENT_TIMESTAMP;comment:记录修改时间" json:"update_at"`
	DeletedAt             gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	CreateUser            string         `gorm:"column:create_user;not null;comment:创建人" json:"create_user"`
	UpdateUser            string         `gorm:"column:update_user;not null;comment:修改人" json:"update_user"`
}

Setting mapped from table <setting>

func (*Setting) TableName

func (*Setting) TableName() string

TableName Setting's table name

type User

type User struct {
	ID         int64          `gorm:"column:id;primaryKey;autoIncrement:true" json:"id"`
	UID        string         `gorm:"column:uid;not null;comment:uid" json:"uid"`
	Username   string         `gorm:"column:username;not null;comment:用户名" json:"username"`
	Nickname   string         `gorm:"column:nickname;not null;comment:昵称" json:"nickname"`
	Motto      string         `gorm:"column:motto;not null;comment:座右铭" json:"motto"`
	Password   string         `gorm:"column:password;not null;comment:密码" json:"password"`
	Salt       string         `gorm:"column:salt;not null;comment:加盐" json:"salt"`
	Birth      time.Time      `gorm:"column:birth;not null;default:2006-01-02;comment:出生日期" json:"birth"`
	Avatar     string         `gorm:"column:avatar;not null;default:avatar.jpg;comment:头像" json:"avatar"`
	RoleID     string         `gorm:"column:role_id;not null;comment:角色Id" json:"role_id"`
	RoleName   string         `gorm:"column:role_name;not null;comment:角色名称" json:"role_name"`
	Phone      string         `gorm:"column:phone;not null;comment:手机号" json:"phone"`
	Wechat     string         `gorm:"column:wechat;not null;comment:微信号" json:"wechat"`
	Email      string         `gorm:"column:email;not null;comment:邮箱" json:"email"`
	State      int32          `gorm:"column:state;not null;comment:用户状态:(0:初始,1:使用,2:停用,3:删除)" json:"state"`
	CreateAt   time.Time      `gorm:"column:create_at;not null;default:CURRENT_TIMESTAMP;comment:记录创建时间" json:"create_at"`
	UpdateAt   time.Time      `gorm:"column:update_at;not null;default:CURRENT_TIMESTAMP;comment:记录修改时间" json:"update_at"`
	DeletedAt  gorm.DeletedAt `gorm:"column:deleted_at" json:"deleted_at"`
	CreateUser string         `gorm:"column:create_user;not null;comment:创建人" json:"create_user"`
	UpdateUser string         `gorm:"column:update_user;not null;comment:修改人" json:"update_user"`
}

User mapped from table <user>

func (*User) TableName

func (*User) TableName() string

TableName User's table name

Jump to

Keyboard shortcuts

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