user

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: May 15, 2016 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 16:30
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 16:41
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 17:39
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 16:19
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 16:44
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 16:59
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 16:18
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 16:55
  • description :
  • history :

*

  • Copyright 2014 @ z3q.net.
  • name :
  • author : jarryliu
  • date : 2014-02-14 17:37
  • description :
  • history :

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CredentialValue

type CredentialValue struct {
	Id       int    `db:"id" auto:"yes" pk:"yes"`
	Usr      string `db:"usr"`
	Pwd      string `db:"pwd"`
	PersonId int    `db:"person_id"`
	// 标记凭据的类型
	Sign    string `db:"sign"`
	Enabled int    `db:"enabled"`
}

用户凭据

type IDeliveryStaff

type IDeliveryStaff interface {
}

type IPerson

type IPerson interface {
	//获取领域对象编号
	GetDomainId() int

	GetValue() PersonValue

	SetValue(*PersonValue) error

	Save() (int, error)
}

type IRole

type IRole interface {
	//获取领域对象编号
	GetDomainId() int

	GetValue() RoleValue

	SetValue(*RoleValue) error

	Save() (int, error)
}

type IUser

type IUser interface {
	// 获取人员信息
	GetPerson() IPerson

	// 获取凭据
	GetCredential(sign string) *CredentialValue

	// 保存凭据
	SaveCredential(*CredentialValue) error
}

type IUserManager

type IUserManager interface {
	// 获取单个用户
	GetUser(id int) IUser

	// 获取所有配送员
	GetDeliveryStaff() []IDeliveryStaff
}

type IUserRep

type IUserRep interface {
	// 保存角色
	SaveRole(*RoleValue) (int, error)

	// 保存人员
	SavePerson(*PersonValue) (int, error)

	// 保存凭据
	SaveCredential(*CredentialValue) (int, error)

	// 获取人员
	GetPersonValue(int) *PersonValue

	// 获取配送人员
	GetDeliveryStaffPersons(partnerId int) []*PersonValue
}

type PersonValue

type PersonValue struct {
	Id       int    `db:"id" pk:"yes" auto:"yes"`
	Name     string `db:"name"`
	RealName string `db:"real_name"`
	Phone    string `db:"phone"`
	Sex      int    `db:"sex"`
	BirthDay int    `db:"birth_day"`
	Enabled  int    `db:"enabled`
}

人员资料

type RoleValue

type RoleValue struct {
	Id   int    `db:"id" pk:"yes" auto:"no"`
	Name string `db:"name"`
	// 表示角色位值
	Flag    int `db:"flag"`
	Enabled int `db:"enabled"`
}

Jump to

Keyboard shortcuts

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