model

package
v0.0.0-...-3d8a049 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Created EventType = iota
	Updated
	Removed

	Deferred EventStatus = iota
	Processed
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Basket

type Basket struct {
	ID       uint64     `db:"id"      yaml:"id"`
	UserID   uint64     `db:"user_id" yaml:"userId"`
	Created  *time.Time `db:"created" yaml:"created"`
	Updated  *time.Time `db:"updated" yaml:"updated"`
	Products Products   `             yaml:"products"`
}

Basket is an entity.

type BasketEvent

type BasketEvent struct {
	ID     uint64
	Type   EventType
	Status EventStatus
	Entity *Basket
}

type BasketEvents

type BasketEvents []BasketEvent

type Baskets

type Baskets []*Basket

type EventStatus

type EventStatus uint8

type EventType

type EventType uint8

type Product

type Product struct {
	ID     uint64 `db:"product_id" yaml:"id"`
	Amount uint64 `db:"amount"     yaml:"amount"`
}

Product is an entity.

type Products

type Products []*Product

Jump to

Keyboard shortcuts

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