user

package
v0.0.0-...-5d74809 Latest Latest
Warning

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

Go to latest
Published: Aug 29, 2022 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = sqlx.ErrNotFound
View Source
var UserStatusDisable int64 = 0
View Source
var UserStatusEnable int64 = 1

Functions

func InitRedis

func InitRedis(c config.Config) *redis.Client

Types

type OamUser

type OamUser struct {
	Id             int64  `db:"id"`               // 编号
	Name           string `db:"name"`             // 用户名
	NickName       string `db:"nick_name"`        // 昵称
	Avatar         string `db:"avatar"`           // 头像
	Password       string `db:"password"`         // 密码
	Email          string `db:"email"`            // 邮箱
	Mobile         string `db:"mobile"`           // 手机号
	Status         int64  `db:"status"`           // 状态  0:禁用   1:正常
	DeptId         int64  `db:"dept_id"`          // 部门ID
	CreateBy       string `db:"create_by"`        // 创建人
	CreateTime     int64  `db:"create_time"`      // 创建时间
	LastUpdateBy   string `db:"last_update_by"`   // 更新人
	LastUpdateTime int64  `db:"last_update_time"` // 更新时间
	DelFlag        int64  `db:"del_flag"`         // 是否删除  -1:已删除  0:正常
	RoleId         int64  `db:"role_id"`          // 岗位Id
	Sex            int64  `db:"sex"`              // 0男,1女
	Age            int64  `db:"age"`              // 默认0
}

type OamUserDept

type OamUserDept struct {
	Id             int64  `db:"id"`               // 编号
	Name           string `db:"name"`             // 部门名称
	CreateBy       string `db:"create_by"`        // 创建人
	CreateTime     int64  `db:"create_time"`      // 创建时间
	LastUpdateBy   string `db:"last_update_by"`   // 更新人
	LastUpdateTime int64  `db:"last_update_time"` // 更新时间
	DelFlag        int64  `db:"del_flag"`         // 是否删除  -1:已删除  0:正常
}

type OamUserDeptModel

type OamUserDeptModel interface {
	RowBuilder() squirrel.SelectBuilder
	CountBuilder(field string) squirrel.SelectBuilder
	FindCount(ctx context.Context, countBuilder squirrel.SelectBuilder) (int64, error)
	FindPageListByPage(ctx context.Context, rowBuilder squirrel.SelectBuilder, page, pageSize int64, orderBy string) ([]*OamUserDept, error)
	// contains filtered or unexported methods
}

OamUserDeptModel is an interface to be customized, add more methods here, and implement the added methods in customOamUserDeptModel.

func NewOamUserDeptModel

func NewOamUserDeptModel(conn sqlx.SqlConn) OamUserDeptModel

NewOamUserDeptModel returns a model for the database table.

type OamUserModel

type OamUserModel interface {
	Trans(ctx context.Context, fn func(context context.Context, session sqlx.Session) error) error
	RowBuilder() squirrel.SelectBuilder
	CountBuilder(field string) squirrel.SelectBuilder
	SumBuilder(field string) squirrel.SelectBuilder
	DeleteSoft(ctx context.Context, data *OamUser) error
	FindOneByQuery(ctx context.Context, rowBuilder squirrel.SelectBuilder) (*OamUser, error)
	FindSum(ctx context.Context, sumBuilder squirrel.SelectBuilder) (float64, error)
	FindCount(ctx context.Context, countBuilder squirrel.SelectBuilder) (int64, error)
	FindAll(ctx context.Context, rowBuilder squirrel.SelectBuilder, orderBy string) ([]*OamUser, error)
	FindPageListByPage(ctx context.Context, rowBuilder squirrel.SelectBuilder, page, pageSize int64, orderBy string) ([]*OamUser, error)
	FindPageListByIdDESC(ctx context.Context, rowBuilder squirrel.SelectBuilder, preMinId, pageSize int64) ([]*OamUser, error)
	FindPageListByIdASC(ctx context.Context, rowBuilder squirrel.SelectBuilder, preMaxId, pageSize int64) ([]*OamUser, error)
	// contains filtered or unexported methods
}

OamUserModel is an interface to be customized, add more methods here, and implement the added methods in customOamUserModel.

func NewOamUserModel

func NewOamUserModel(conn sqlx.SqlConn) OamUserModel

NewOamUserModel returns a model for the database table.

type OamUserRole

type OamUserRole struct {
	Id             int64  `db:"id"`               // 编号
	Name           string `db:"name"`             // 角色名称
	RoleType       int64  `db:"role_type"`        // 角色类型
	CreateBy       string `db:"create_by"`        // 创建人
	CreateTime     int64  `db:"create_time"`      // 创建时间
	LastUpdateBy   string `db:"last_update_by"`   // 更新人
	LastUpdateTime int64  `db:"last_update_time"` // 更新时间
	DelFlag        int64  `db:"del_flag"`         // 是否删除  -1:已删除  0:正常
	Status         int64  `db:"status"`           // 状态  1:启用,0:禁用
}

type OamUserRoleDept

type OamUserRoleDept struct {
	Id             int64  `db:"id"`               // 编号
	RoleId         int64  `db:"role_id"`          // 角色ID
	DeptId         int64  `db:"dept_id"`          // 部门ID
	CreateBy       string `db:"create_by"`        // 创建人
	CreateTime     int64  `db:"create_time"`      // 创建时间
	LastUpdateBy   string `db:"last_update_by"`   // 更新人
	LastUpdateTime int64  `db:"last_update_time"` // 更新时间
}

type OamUserRoleDeptModel

type OamUserRoleDeptModel interface {
	// contains filtered or unexported methods
}

OamUserRoleDeptModel is an interface to be customized, add more methods here, and implement the added methods in customOamUserRoleDeptModel.

func NewOamUserRoleDeptModel

func NewOamUserRoleDeptModel(conn sqlx.SqlConn) OamUserRoleDeptModel

NewOamUserRoleDeptModel returns a model for the database table.

type OamUserRoleModel

type OamUserRoleModel interface {
	RowBuilder() squirrel.SelectBuilder
	CountBuilder(field string) squirrel.SelectBuilder
	FindCount(ctx context.Context, countBuilder squirrel.SelectBuilder) (int64, error)
	FindPageListByPage(ctx context.Context, rowBuilder squirrel.SelectBuilder, page, pageSize int64, orderBy string) ([]*OamUserRole, error)
	// contains filtered or unexported methods
}

OamUserRoleModel is an interface to be customized, add more methods here, and implement the added methods in customOamUserRoleModel.

func NewOamUserRoleModel

func NewOamUserRoleModel(conn sqlx.SqlConn) OamUserRoleModel

NewOamUserRoleModel returns a model for the database table.

Jump to

Keyboard shortcuts

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