user

package
v0.0.1-beta Latest Latest
Warning

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

Go to latest
Published: Aug 4, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewRepoUser)

Functions

func NewRepoUser

func NewRepoUser(data *base.Data) biz.IRepoUser

Types

type RepoUser

type RepoUser struct {
	base.Base
	// contains filtered or unexported fields
}

func (*RepoUser) Create

func (repo *RepoUser) Create(ctx context.Context, bizUser *biz.User) error

func (*RepoUser) Delete

func (repo *RepoUser) Delete(ctx context.Context, bizUser *biz.User) error

func (*RepoUser) GetByID

func (repo *RepoUser) GetByID(ctx context.Context, id int64) (*biz.User, error)

func (*RepoUser) GetByUsername

func (repo *RepoUser) GetByUsername(ctx context.Context, username string) (*biz.User, error)

func (*RepoUser) Update

func (repo *RepoUser) Update(ctx context.Context, id int64, updateFields map[string]interface{}) error

type User

type User struct {
	ID          int64          `json:"id" gorm:"primaryKey"`
	Username    string         `json:"username" gorm:"type:varchar(64);uniqueIndex:CODE_DELETED"`
	Password    string         `json:"password" gorm:"type:varchar(128)"`
	Email       string         `json:"email" gorm:"type:varchar(128)"`
	PhoneNumber string         `json:"phoneNumber" gorm:"type:varchar(128)"`
	ExtraInfo   base.ExtraInfo `json:"extraInfo" gorm:"type:json"`
	base.Model
}

func (User) TableName

func (User) TableName() string

Jump to

Keyboard shortcuts

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