repository

package
v0.0.0-...-978cf5a Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func NewEntClient

func NewEntClient() *ent.Client

NewEntClient create an ent client with default config

func NewOrderSQL

func NewOrderSQL(dbClient *ent.Client) usecase.Repository

NewOrderSQL creates a new OrderRepository. This is the concrete implementation of Repository with SQL.

Types

type OrderRepository

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

func (*OrderRepository) Create

func (o *OrderRepository) Create(ctx context.Context, order *entity.Order) error

Create implements usecase.Repository.Create

func (*OrderRepository) GetByOutOrderNo

func (o *OrderRepository) GetByOutOrderNo(ctx context.Context, outOrderNo string) (*entity.Order, error)

GetByOutOrderNo implements usecase.Repository.GetByOutOrderNo

func (*OrderRepository) UpdateOrderStatus

func (o *OrderRepository) UpdateOrderStatus(ctx context.Context, outOrderNo string, orderStatus int8) error

UpdateOrderStatus implements usecase.Repository.UpdateOrderStatus

Jump to

Keyboard shortcuts

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