biz

package
v0.0.0-...-4241208 Latest Latest
Warning

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

Go to latest
Published: May 8, 2024 License: MIT, MIT Imports: 6 Imported by: 0

README

Biz

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewGreeterUsecase)

ProviderSet is biz providers.

Functions

This section is empty.

Types

type Orders

type Orders struct {
	OrderId          int64
	OrderNo          string
	TxId             int64
	OrderStatus      string
	DeliveredAddress string
	ShippingCost     float64
	TotalAmount      float64
	PlacedUserId     int64
	PlacedAt         time.Time
	ShippedAddress   string
	ShippedAt        time.Time
	PaymentId        int64
}

type Transaction

type Transaction struct {
	TxId      int64
	TxNo      string
	TxType    string
	UserId    int64
	Quantity  int
	TxStatus  string
	TxDate    time.Time
	TxAmount  float64
	PaymentId int64
	TxItems   []*TxItem
}

Transaction is a Transaction model.

type TransactionRepo

type TransactionRepo interface {
	Save(context.Context, *Transaction) (*Transaction, error)
	Update(context.Context, *Transaction) (*Transaction, error)
	FindByID(context.Context, int64) (*Transaction, error)
	ListByHello(context.Context, string) ([]*Transaction, error)
	ListAll(context.Context) ([]*Transaction, error)
}

TransactionRepo is a Greater repo.

type TransactionUsecase

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

TransactionUsecase is a Transaction usecase.

func NewTransactionUsecase

func NewTransactionUsecase(repo TransactionRepo, logger log.Logger) *TransactionUsecase

NewTransactionUsecase new a Transaction usecase.

func (*TransactionUsecase) CreateTransaction

func (uc *TransactionUsecase) CreateTransaction(ctx context.Context, g *Transaction) (*Transaction, error)

CreateTransaction creates a Transaction, and returns the new Transaction.

type TxItem

type TxItem struct {
	TxItemId    int64
	TxType      string
	TxId        int64
	BookId      int64
	Quantity    int
	Price       float64
	Isbn        string
	Title       string
	Author      string
	PublisherId int64
	ImageUrl    string
}

Jump to

Keyboard shortcuts

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