entities

package
v0.0.0-...-58e3b6f Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cart

type Cart struct {
	Items *CartItems
}

type CartItem

type CartItem struct {
	ID       uint
	Quantity uint
}

type CartItems

type CartItems map[uint]CartItem

func (CartItems) Put

func (ci CartItems) Put(item CartItem)

type Customer

type Customer struct {
	Entity
	ID          uint64 `db:"id" json:"id"`
	PhoneNumber string `db:"phone" json:"phone"`
	Email       string `db:"email" json:"email"`
	FirstName   string `db:"firstname" json:"firstname"`
	LastName    string `db:"lastname" json:"lastname"`
	Patronymic  string `db:"patronymic" json:"patronymic"`
}

type CustomerCart

type CustomerCart map[uint64]Cart

type Entitable

type Entitable interface {
	GetProps(tag string) Properties
	GetPK(tag string) PK
}

type Entity

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

func NewEntity

func NewEntity(pk []string, props Properties) Entity

func (*Entity) GetPK

func (c *Entity) GetPK(tag string) PK

func (*Entity) GetProps

func (c *Entity) GetProps(tag string) Properties

type PK

type PK = map[string]any

type Properties

type Properties = map[string]any

Jump to

Keyboard shortcuts

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