model

package
v0.0.0-...-b480da5 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2019 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GroupCreate

func GroupCreate(db *xorm.Session, groupBO *GroupBO) (int64, error)

func GroupDelete

func GroupDelete(db *xorm.Session, id int64) error

func GroupUpdate

func GroupUpdate(db *xorm.Session, groupBO *GroupBO) error

func UserCreate

func UserCreate(db *xorm.Session, userInfo *User) (int64, error)

func UserDelete

func UserDelete(db *xorm.Session, userId int64) error

func UserUpdate

func UserUpdate(db *xorm.Session, userInfo *User) error

Types

type Group

type Group struct {
	Id          int64
	Name        string
	Description string
	Users       string
}

func GroupGet

func GroupGet(db *xorm.Session, id int64) (*Group, error)

type GroupBO

type GroupBO struct {
	Id          int64
	Name        string
	Description string
	Users       []*User
}

func GetAllGroupByUser

func GetAllGroupByUser(db *xorm.Session, id int64) ([]*GroupBO, error)

func GroupGetBO

func GroupGetBO(db *xorm.Session, id int64) (*GroupBO, error)

type User

type User struct {
	Id       int64
	Email    string `json:"email" form:"email"`
	Username string `json:"username" form:"username"`
	Password string `json:"password" form:"password"`
}

func UserGetByEmail

func UserGetByEmail(db *xorm.Session, email string) (*User, error)

func UserGetById

func UserGetById(db *xorm.Session, userId int64) (*User, error)

func UserGetByUsername

func UserGetByUsername(db *xorm.Session, username string) (*User, error)

Jump to

Keyboard shortcuts

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