Documentation ¶
Index ¶
- func CollectionProductCategories(ctx context.Context) (*mongo.Collection, error)
- func CollectionProductOptions(ctx context.Context) (*mongo.Collection, error)
- func CollectionProducts(ctx context.Context) (*mongo.Collection, error)
- func CollectionStores(ctx context.Context) (*mongo.Collection, error)
- func CollectionTaxes(ctx context.Context) (*mongo.Collection, error)
- type CustomizablePrice
- type Image
- type Product
- type ProductCategory
- type ProductOption
- type ProductOptionValue
- type ProductVariation
- type ProductVariationOption
- type Store
- type Tax
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectionProductCategories ¶ added in v1.16.0
func CollectionProductCategories(ctx context.Context) (*mongo.Collection, error)
func CollectionProductOptions ¶
func CollectionProductOptions(ctx context.Context) (*mongo.Collection, error)
func CollectionProducts ¶
func CollectionProducts(ctx context.Context) (*mongo.Collection, error)
func CollectionStores ¶ added in v1.15.0
func CollectionStores(ctx context.Context) (*mongo.Collection, error)
func CollectionTaxes ¶
func CollectionTaxes(ctx context.Context) (*mongo.Collection, error)
Types ¶
type CustomizablePrice ¶
type Product ¶
type Product struct { ID primitive.ObjectID `bson:"_id" json:"id"` SKU string `bson:"sku" json:"sku"` Name string `bson:"name" json:"name"` Price CustomizablePrice `bson:"price" json:"price"` TaxClassStandard string `bson:"taxClassStandard" json:"taxClassStandard"` TaxClassTakeAway string `bson:"taxClassTakeAway" json:"taxClassTakeAway"` Categories []string `bson:"categories" json:"categories"` Images []Image `bson:"images" json:"images"` Options []string `bson:"options" json:"options"` Variations []ProductVariation `bson:"variations" json:"variations"` DisabledIn []string `bson:"disabledIn" json:"disabledIn"` OutOfStockIn []string `bson:"outOfStockIn" json:"outOfStockIn"` CreatedAt time.Time `bson:"createdAt" json:"createdAt"` UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"` }
type ProductCategory ¶ added in v1.16.0
type ProductOption ¶
type ProductOption struct { ID primitive.ObjectID `bson:"_id" json:"id"` Name string `bson:"name" json:"name"` DisplayName string `bson:"displayName" json:"displayName"` Values []ProductOptionValue `bson:"values" json:"values"` CreatedAt time.Time `bson:"createdAt" json:"createdAt"` UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"` }
type ProductOptionValue ¶
type ProductVariation ¶
type ProductVariation struct { SKU string `bson:"sku" json:"sku"` Price CustomizablePrice `bson:"price" json:"price"` Options []ProductVariationOption `bson:"options" json:"options"` }
type ProductVariationOption ¶
type Store ¶ added in v1.15.0
type Store struct { ID primitive.ObjectID `bson:"_id" json:"id"` Email string `bson:"email" json:"email"` Telephone string `bson:"telephone" json:"telephone"` Name string `bson:"name" json:"name"` Key string `bson:"key" json:"key"` Address string `bson:"address" json:"address"` Owner string `bson:"owner" json:"owner"` BusinessRegistration string `bson:"businessRegistration" json:"businessRegistration"` TaxNumber string `bson:"taxNumber" json:"taxNumber"` CreatedAt time.Time `bson:"createdAt" json:"createdAt"` UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"` }
type Tax ¶
type Tax struct { ID primitive.ObjectID `bson:"_id" json:"id"` Name string `bson:"name" json:"name"` DisplayName string `bson:"displayName" json:"displayName"` Rate string `bson:"rate" json:"rate"` CreatedAt time.Time `bson:"createdAt" json:"createdAt"` UpdatedAt time.Time `bson:"updatedAt" json:"updatedAt"` }
Click to show internal directories.
Click to hide internal directories.