model

package
v2.0.0-rc.18 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 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

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

type History

type History interface {
	IsHistory()
}

type Identifiable

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

type Info

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

func (this Purchase) GetQuantity() int

func (Purchase) IsHistory

func (Purchase) IsHistory()

func (Purchase) IsInfo

func (Purchase) IsInfo()

type Sale

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

func (Sale) GetLocation

func (this Sale) GetLocation() string

func (Sale) IsHistory

func (Sale) IsHistory()

func (Sale) IsStore

func (Sale) IsStore()

type Store

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

func (this User) GetID() string

func (User) IsEntity

func (User) IsEntity()

func (User) IsIdentifiable

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

func (this WalletType1) GetAmount() float64

func (WalletType1) GetCurrency

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

func (this WalletType2) GetAmount() float64

func (WalletType2) GetCurrency

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