models

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Feb 13, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Active   = iota
	InActive = iota
	NoExist  = iota

	//default avatar if no thumb for user
	DefaultAvatar string = `` /* 2128-byte string literal not displayed */
)

Variables

This section is empty.

Functions

This section is empty.

Types

type LoginLog

type LoginLog struct {
	mgodo.BaseModel `bson:",inline"`
	Account         string `bson:"Account,omitempty"`
	Status          string `bson:"Status,omitempty"`
	IPAddress       string `bson:"IPAddress,omitempty"`
	User            *User  `bson:"-"`
}

func (*LoginLog) GenUser

func (m *LoginLog) GenUser(s *mgo.Session)

type User

type User struct {
	mgodo.BaseModel `bson:",inline"`
	Identity        string `bson:"Identity,omitempty"`
	Name            string `bson:"Name,omitempty"`
	First           string `bson:"First,omitempty"`
	Last            string `bson:"Last,omitempty"`
	Mail            string `bson:"Mail,omitempty"`
	Depart          string `bson:"Depart,omitempty"`
	Avatar          string `bson:"Avatar,omitempty"`
	IsNotExist      bool   `bson:"IsNotExist,omitempty"`
}

func (*User) GetAvatar

func (c *User) GetAvatar()

func (*User) GetName

func (c *User) GetName() string

GetName Parse full name from Li, Ming R&D/CN format

func (*User) SaveUser

func (c *User) SaveUser(s *mgo.Session) error

Save authorized saUser to local User

Jump to

Keyboard shortcuts

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