user

package
v0.4.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2021 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

*

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

*

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

*

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

*

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

*

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

*

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

*

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

*

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

*

  • Copyright 2014 @ 56x.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       int32  `db:"id" auto:"yes" pk:"yes"`
	Usr      string `db:"user"`
	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() int32

	GetValue() PersonValue

	SetValue(*PersonValue) error

	Save() (int32, error)
}

type IRole

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

	GetValue() RoleValue

	SetValue(*RoleValue) error

	Save() (int32, error)
}

type IUser

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

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

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

type IUserManager

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

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

type IUserRepo

type IUserRepo interface {
	// 保存角色
	SaveRole(*RoleValue) (int32, error)

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

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

	// 获取人员
	GetPersonValue(id int32) *PersonValue

	// 获取配送人员
	GetDeliveryStaffPersons(mchId int64) []*PersonValue
}

type PersonValue

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

人员资料

type RoleValue

type RoleValue struct {
	Id   int32  `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