models

package
v0.0.0-...-6ed6772 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Group

type Group struct {
	ID            int    `json:"id"`
	Name          string `json:"name"`
	Description   string `json:"description"`
	Image         string `json:"image"`
	ParentGroupId int    `json:"parent_group_id"`
}

func (Group) String

func (g Group) String() string

type Groups

type Groups struct {
	Groups []Group `json:"groups"`
}

type Product

type Product struct {
	ID           int       `json:"id"`
	ExternalId   string    `json:"external_id"`
	Name         string    `json:"name"`
	Sku          string    `json:"sku"`
	Keywords     string    `json:"keywords"`
	Presence     string    `json:"presence"`
	Price        float64   `json:"price"`
	Currency     string    `json:"currency"`
	Description  string    `json:"description"`
	Group        group     `json:"group"`
	Category     category  `json:"category"`
	MainImage    string    `json:"main_image"`
	Images       []image   `json:"images"`
	SellingType  string    `json:"selling_type"`
	Status       string    `json:"status"`
	DateModified time.Time `json:"date_modified"`
}

func (Product) GetTranslatedStatus

func (p Product) GetTranslatedStatus() string

func (Product) String

func (p Product) String() string

type ProductUpdate

type ProductUpdate struct {
	ID    int     `json:"id"`
	Price float64 `json:"price"`
}

func (ProductUpdate) String

func (p ProductUpdate) String() string

type ProductUpdateResponse

type ProductUpdateResponse struct {
	ProcessedIds []int    `json:"processed_ids"`
	Errors       []string `json:"errors"`
}

type Products

type Products struct {
	Products []Product `json:"products"`
	GroupId  int       `json:"group_id"`
}

type ProductsArray

type ProductsArray []Product

func (ProductsArray) Len

func (a ProductsArray) Len() int

func (ProductsArray) Less

func (a ProductsArray) Less(i, j int) bool

func (ProductsArray) Swap

func (a ProductsArray) Swap(i, j int)

Jump to

Keyboard shortcuts

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