biz

package
v0.0.0-...-f5f9a9e Latest Latest
Warning

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

Go to latest
Published: Aug 7, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUserNotFound = errors.New("user not found")
)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type BaseModel

type BaseModel struct {
	ID         int64 `gorm:"primary_key;auto_increment;not_null"`
	CreateTime time.Time
	UpdateTime time.Time
	//默认为空
	DeleteTime *time.Time
	Creator    int64
	Updater    int64
}

BaseModel 基础模型

type SystemUser

type SystemUser struct {
	Id       int64
	Username string
	Nickname string
	Mobile   string
	Password string
	BaseModel
}

User 用户

type SystemUserRepo

type SystemUserRepo interface {
	CreateUser(ctx context.Context, u *SystemUser) (int64, error)
	GetUser(ctx context.Context, id int64) (*SystemUser, error)
}

type SystemUserUseCase

type SystemUserUseCase struct {
	// contains filtered or unexported fields
}

func NewSystemUserUseCase

func NewSystemUserUseCase(repo SystemUserRepo, logger log.Logger) *SystemUserUseCase

type Transaction

type Transaction interface {
	InTx(context.Context, func(ctx context.Context) error) error
}

Transaction 事务

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳