model

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 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 Issue

type Issue struct {
	ID        int       `gorm:"primaryKey" json:"id"`
	ItemID    uint64    `json:"item_id"`
	Code      string    `json:"code"`
	Message   string    `json:"message"`
	Severity  string    `json:"severity"`
	CreatedAt time.Time `json:"createdAt,omitempty" gorm:"column:createdAt"`
	UpdatedAt time.Time `json:"updatedAt,omitempty" gorm:"column:updatedAt"`
}

func (Issue) TableName

func (Issue) TableName() string

type Item

type Item struct {
	// Standard object's metadata.
	metav1.ObjectMeta `json:"metadata,omitempty"`

	ASIN         string `json:"asin"`
	SKU          string `json:"sku"`
	Brand        string `json:"brand"`
	Title        string `json:"title"`
	ProductGroup string `json:"product_group"`
	ProductType  string `json:"product_type"`
	Status       int    `json:"status"`
}

func (Item) TableName

func (Item) TableName() string

type ItemAttributes

type ItemAttributes struct {
	ID                    uint64    `gorm:"primaryKey" json:"id"`
	ItemID                uint64    `json:"item_id"`
	Binding               string    `json:"binding"`
	ItemHeight            float64   `json:"item_height"`
	ItemLength            float64   `json:"item_length"`
	ItemWidth             float64   `json:"item_width"`
	ItemWeight            float64   `json:"item_weight"`
	ItemDimensionsUnit    string    `json:"item_dimensions_unit"`
	PackageHeight         float64   `json:"package_height"`
	PackageLength         float64   `json:"package_length"`
	PackageWidth          float64   `json:"package_width"`
	PackageWeight         float64   `json:"package_weight"`
	PackageDimensionsUnit string    `json:"package_dimensions_unit"`
	ReleaseDate           time.Time `json:"release_date"`
	CreatedAt             time.Time `json:"createdAt,omitempty" gorm:"column:createdAt"`
	UpdatedAt             time.Time `json:"updatedAt,omitempty" gorm:"column:updatedAt"`
}

func (ItemAttributes) TableName

func (ItemAttributes) TableName() string

type ItemExtend

type ItemExtend struct {
	ItemAttributes            []ItemAttributes           `gorm:"foreignKey:ItemID"`
	ItemImages                []ItemImage                `gorm:"foreignKey:ItemID"`
	ItemSummaryByMarketplaces []ItemSummaryByMarketplace `gorm:"foreignKey:ItemID"`
	Issues                    []Issue                    `gorm:"foreignKey:ItemID"`
	ItemOfferByMarketplaces   []ItemOfferByMarketplace   `gorm:"foreignKey:ItemID"`
}

type ItemImage

type ItemImage struct {
	ID        uint64    `gorm:"primaryKey" json:"id"`
	ItemID    uint64    `json:"item_id"`
	ImageURL  string    `json:"image_url"`
	CreatedAt time.Time `json:"createdAt,omitempty" gorm:"column:createdAt"`
	UpdatedAt time.Time `json:"updatedAt,omitempty" gorm:"column:updatedAt"`
}

func (ItemImage) TableName

func (ItemImage) TableName() string

type ItemList

type ItemList struct {

	// Standard list metadata.
	// +optional
	metav1.ListMeta `json:",inline"`

	Items []*Item `json:"items"`
}

type ItemOfferByMarketplace

type ItemOfferByMarketplace struct {
	ID                 uint64    `gorm:"primaryKey" json:"id"`
	ItemID             uint64    `json:"item_id"`
	MarketplaceID      string    `json:"marketplace_id"`
	ListPrice          float64   `json:"list_price"`
	CurrencyCode       string    `json:"currency_code"`
	PackageQuantity    int       `json:"package_quantity"`
	AvailabilityStatus string    `json:"availability_status"`
	FulfillmentChannel string    `json:"fulfillment_channel"`
	CreatedAt          time.Time `json:"createdAt,omitempty" gorm:"column:createdAt"`
	UpdatedAt          time.Time `json:"updatedAt,omitempty" gorm:"column:updatedAt"`
}

func (ItemOfferByMarketplace) TableName

func (ItemOfferByMarketplace) TableName() string

type ItemSummaryByMarketplace

type ItemSummaryByMarketplace struct {
	ID            uint64    `gorm:"primaryKey" json:"id"`
	ItemID        uint64    `json:"item_id"`
	MarketplaceID string    `json:"marketplace_id"`
	SalesRank     int       `json:"sales_rank"`
	MainImageURL  string    `json:"main_image_url"`
	CreatedAt     time.Time `json:"createdAt,omitempty" gorm:"column:createdAt"`
	UpdatedAt     time.Time `json:"updatedAt,omitempty" gorm:"column:updatedAt"`
}

func (ItemSummaryByMarketplace) TableName

func (ItemSummaryByMarketplace) TableName() string

Jump to

Keyboard shortcuts

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