domain

package
v0.0.0-...-40fc3ee Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalogue

type Catalogue struct {
	ID          bson.ObjectId   `json:"id" bson:"_id,omitempty"`
	Products    []bson.ObjectId `json:"author" bson:"author,omitempty"`
	Name        string          `json:"name" bson:"name,omitempty"`
	Details     string          `json:"details" bson:"details,omitempty"`
	Description string          `json:"description" bson:"description,omitempty"`
	Type        string          `json:"type" bson:"type,omitempty"`
	Tags        []string        `json:"tags" bson:"tags,omitempty"`
	Date        time.Time       `json:"timestamp" bson:"timestamp,omitempty"`
}

Catalogue ...

func NewCatalogue

func NewCatalogue(name, details, description, typ string, productIDs, tags []string) *Catalogue

NewCatalogue creates a new Catalogue!

type Image

type Image struct {
	Name   string `json:"name" bson:"name,omitempty"`
	Type   string `json:"type" bson:"type,omitempty"`
	Size   int64  `json:"size" bson:"size,omitempty"`
	Width  int    `json:"width" bson:"width,omitempty"`
	Height int    `json:"height" bson:"height,omitempty"`
}

Image ...

type Product

type Product struct {
	ID          bson.ObjectId `json:"id" bson:"_id,omitempty"`
	Name        string        `json:"name" bson:"name,omitempty"`
	Details     string        `json:"details" bson:"details,omitempty"`
	Description string        `json:"description" bson:"description,omitempty"`
	Images      []Image       `json:"productImage" bson:"product_image,omitempty"`
	Type        string        `json:"type" bson:"type,omitempty"`
	Price       float64       `json:"price" bson:"price,omitempty"`
	Discount    float32       `json:"discount" bson:"discount,omitempty"`
	Tags        []string      `json:"tags" bson:"tags,omitempty"`
	Date        time.Time     `json:"timestamp" bson:"timestamp,omitempty"`
}

Product ...

func NewProduct

func NewProduct(name, details, description, typ string, tags []string, price float64, discount float32) *Product

NewProduct creates a new Product!

Jump to

Keyboard shortcuts

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