data

package
v0.0.0-...-e6547ed Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2023 License: MIT Imports: 8 Imported by: 0

README

Data

Documentation

Index

Constants

This section is empty.

Variables

ProviderSet is data providers.

Functions

func NewDB

func NewDB(conf *conf.Data, logger log.Logger) *gorm.DB

*

  • 创建DB

func NewOrderRepo

func NewOrderRepo(data *Data, logger log.Logger) biz.OrderRepo

NewOrderRepo .

Types

type Data

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

Data .

func NewData

func NewData(db *gorm.DB, logger log.Logger) (*Data, func(), error)

NewData .

type Order

type Order struct {
	gorm.Model
	Id     int64
	UserId int64
}

type OrderRepo

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

func (*OrderRepo) ListAll

func (r *OrderRepo) ListAll(ctx context.Context, pageNum int64, pageSize int64) ([]*biz.Order, error)

*

  • 获取订单列表

Jump to

Keyboard shortcuts

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