model

package
v1.67.4 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2024 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Cat added in v1.64.0

type Cat struct {
	Name string `json:"name"`
}

type History

type History interface {
	IsHistory()
}

type Identifiable added in v1.64.0

type Identifiable interface {
	IsIdentifiable()
	GetID() string
}

type Info added in v1.64.0

type Info interface {
	IsInfo()
	GetQuantity() int
}

type Product

type Product struct {
	Upc string `json:"upc"`
}

func (Product) IsEntity

func (Product) IsEntity()

type Purchase

type Purchase struct {
	Product  *Product `json:"product"`
	Wallet   Wallet   `json:"wallet"`
	Quantity int      `json:"quantity"`
}

func (Purchase) GetQuantity added in v1.64.0

func (this Purchase) GetQuantity() int

func (Purchase) IsHistory

func (Purchase) IsHistory()

func (Purchase) IsInfo added in v1.64.0

func (Purchase) IsInfo()

type Sale

type Sale struct {
	Product  *Product `json:"product"`
	Rating   int      `json:"rating"`
	Location string   `json:"location"`
}

func (Sale) GetLocation added in v1.64.0

func (this Sale) GetLocation() string

func (Sale) IsHistory

func (Sale) IsHistory()

func (Sale) IsStore added in v1.64.0

func (Sale) IsStore()

type Store added in v1.64.0

type Store interface {
	IsStore()
	GetLocation() string
}

type User

type User struct {
	ID       string    `json:"id"`
	Username string    `json:"username"`
	History  []History `json:"history"`
	RealName string    `json:"realName"`
}

func (User) GetID added in v1.64.0

func (this User) GetID() string

func (User) IsEntity

func (User) IsEntity()

func (User) IsIdentifiable added in v1.64.0

func (User) IsIdentifiable()

type Wallet

type Wallet interface {
	IsWallet()
	GetCurrency() string
	GetAmount() float64
}

type WalletType1

type WalletType1 struct {
	Currency      string  `json:"currency"`
	Amount        float64 `json:"amount"`
	SpecialField1 string  `json:"specialField1"`
}

func (WalletType1) GetAmount added in v1.64.0

func (this WalletType1) GetAmount() float64

func (WalletType1) GetCurrency added in v1.64.0

func (this WalletType1) GetCurrency() string

func (WalletType1) IsWallet

func (WalletType1) IsWallet()

type WalletType2

type WalletType2 struct {
	Currency      string  `json:"currency"`
	Amount        float64 `json:"amount"`
	SpecialField2 string  `json:"specialField2"`
}

func (WalletType2) GetAmount added in v1.64.0

func (this WalletType2) GetAmount() float64

func (WalletType2) GetCurrency added in v1.64.0

func (this WalletType2) GetCurrency() string

func (WalletType2) IsWallet

func (WalletType2) IsWallet()

Jump to

Keyboard shortcuts

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