status

package
v0.0.0-...-2ad8e27 Latest Latest
Warning

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

Go to latest
Published: Jan 1, 2025 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OrderStatus

type OrderStatus struct {
	ID      primitive.ObjectID `bson:"_id,omitempty" json:"id"`
	OrderId string             `bson:"orderId"`
	UserId  string             `bson:"userId"`

	Placed           bool `bson:"placed"`
	PartialValidated bool `bson:"partialValidated"`
	Validated        bool `bson:"validated"`
	PartialPayment   bool `bson:"partialPayment"`
	PaymentCompleted bool `bson:"paymentCompleted"`

	Created time.Time `bson:"created"`
	Updated time.Time `bson:"updated"`
}

Estuctura basica de del evento

func (*OrderStatus) ValidateSchema

func (e *OrderStatus) ValidateSchema() error

ValidateSchema valida la estructura para ser insertada en la db

type StatusRepository

type StatusRepository interface {
	Insert(order *OrderStatus) (*OrderStatus, error)
	FindByOrderId(orderId string) (*OrderStatus, error)
}

func NewStatusRepository

func NewStatusRepository(log log.LogRusEntry, collection db.Collection) StatusRepository

type StatusService

type StatusService interface {
	Update(orderId string, ev []*events.Event, odr *order.Order) error
}

func NewStatusService

func NewStatusService(log log.LogRusEntry, repository StatusRepository) StatusService

Jump to

Keyboard shortcuts

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