systemModel

package
v0.0.0-...-2ddc99a Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func QuerySystemAdminsCount

func QuerySystemAdminsCount(args map[string]interface{}) (count int)

系统管理员总记录数

	param username
 param manager
 return count

Types

type SystemAdmin

type SystemAdmin struct {
	model.Model
	Username  string    `gorm:"not null;unique;" json:"username"`           // 用户名
	Nikename  string    `json:"nikename"`                                   // 昵称
	Password  string    `gorm:"not null;" json:"-"`                         // 密码
	IP        string    `json:"ip"`                                         // 登录IP
	Token     string    `json:"token"`                                      // 授权令牌
	Manager   string    `gorm:"not null;default:'N';size:1" json:"manager"` // 操作权限 Y | N
	Avatar    string    `json:"avatar"`                                     // 头像
	CreatedBy string    `json:"created_by"`                                 // 创建人
	IsEnable  bool      `json:"is_enable"`                                  // 是否启用 true| false
	UUID      uuid.UUID `json:"uuid"`
}

SystemAdmin model 系统管理员

func QuerySystemAdmins

func QuerySystemAdmins(args map[string]interface{}, pageSize int, page int) (SystemAdmins []SystemAdmin)

批量查询系统管理员

param username
param manager
return SystemAdmins

func (*SystemAdmin) AddSystemAdmin

func (a *SystemAdmin) AddSystemAdmin() error

添加系统管理员账号

func (*SystemAdmin) DeleteSystemAdmin

func (a *SystemAdmin) DeleteSystemAdmin(ids []int64) error

删除系统管理员(可批量)

	param id
 return error

func (*SystemAdmin) LoginSystemAdmin

func (a *SystemAdmin) LoginSystemAdmin() error

系统管理员登录

param username
param password
return SystemAdmin,error

func (*SystemAdmin) QuerySystemAdminByID

func (a *SystemAdmin) QuerySystemAdminByID() error

查询系统管理员 by ID

	param id
 return SystemAdmin,error

func (*SystemAdmin) QuerySystemAdminByToken

func (a *SystemAdmin) QuerySystemAdminByToken() error

查询系统管理员 by token

	param token
 return SystemAdmin,error

func (*SystemAdmin) QuerySystemAdminByUsername

func (a *SystemAdmin) QuerySystemAdminByUsername() error

查询系统管理员 by username

	param username
 return SystemAdmin,error

func (*SystemAdmin) UpdateSystemAdmin

func (a *SystemAdmin) UpdateSystemAdmin(args map[string]interface{}) error

更新管理员 by id

Jump to

Keyboard shortcuts

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