userManagement

package
v0.0.0-...-4d32bc5 Latest Latest
Warning

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

Go to latest
Published: Dec 30, 2019 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateUsers

func CreateUsers(db *gorm.DB, users map[string]User) error

func GetAllUsers

func GetAllUsers(db *gorm.DB) (usersMap map[string]User, err error)

func InitTableFromFile

func InitTableFromFile(db *gorm.DB, csvFilePath string) (users map[string]User, err error)

Types

type User

type User struct {
	gorm.Model

	Name           string `gorm:"column:name"`
	UserID         string `gorm:"column:user_id;unique_index"` //微信中的ID
	SapID          string `gorm:"column:sapid"`
	IdNumber       string `gorm:"column:id_number"` //身份证号
	Birthday       int    `gorm:"column:birthday"`  //19830701
	Gender         string `gorm:"column:gender"`
	Mobile         string `gorm:"column:mobile"`
	Email          string `gorm:"column:email"`
	Department     string `gorm:"column:department"`
	Position       string `gorm:"column:position"`
	PositionWeight int    `gorm:"column:position_weight"`

	//显示的姓名,例如:陈翔(主任)、马迅飞(信息技术室主任)、李华松(信息技术室)
	NameDisplay string `gorm:"column:name_display"`
}

Jump to

Keyboard shortcuts

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