repositoryimpl

package
v0.0.0-...-d7fecdb Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2023 License: Apache-2.0 Imports: 14 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserRegRepo

func NewUserRegRepo(m mongodbClient) repository.UserReg

func NewUserRepo

func NewUserRepo(m mongodbClient) repository.User

Types

type DUser

type DUser struct {
	Id primitive.ObjectID `bson:"_id"       json:"-"`

	Name                    string `bson:"name"       json:"name"`
	Email                   string `bson:"email"      json:"email"`
	Bio                     string `bson:"bio"        json:"bio"`
	AvatarId                string `bson:"avatar_id"  json:"avatar_id"`
	PlatformToken           string `bson:"token"      json:"token"`
	PlatformTokenCreateAt   int64  `bson:"token_create_time"      json:"token_create_time"`
	PlatformUserId          string `bson:"uid"        json:"uid"`
	PlatformUserNamespaceId string `bson:"nid"        json:"nid"`

	CourseAgreement   string `bson:"course_agreement"        json:"course_agreement"`
	FinetuneAgreement string `bson:"finetune_agreement"        json:"finetune_agreement"`
	UserAgreement     string `bson:"user_agreement"        json:"user_agreement"`

	Follower  []string `bson:"follower"   json:"-"`
	Following []string `bson:"following"  json:"-"`

	// Version will be increased by 1 automatically.
	// So, don't marshal it to avoid setting it occasionally.
	Version int `bson:"version"    json:"-"`
}

type DUserRegInfo

type DUserRegInfo struct {
	Account  string            `bson:"account"        json:"account"`
	Name     string            `bson:"name"           json:"name"`
	City     string            `bson:"city"           json:"city"`
	Email    string            `bson:"email"          json:"email"`
	Phone    string            `bson:"phone"          json:"phone"`
	Identity string            `bson:"identity"       json:"identity"`
	Province string            `bson:"province"       json:"province"`
	Detail   map[string]string `bson:"detail"         json:"detail"`
	Version  int               `bson:"version"        json:"-"`
}

Jump to

Keyboard shortcuts

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