northwind

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Aug 14, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Address

type Address struct {
	Line1      string    `json:"Line1"`
	Line2      string    `json:"Line2,omitempty"`
	City       string    `json:"City"`
	Region     string    `json:"Region,omitempty"`
	PostalCode string    `json:"PostalCode"`
	Country    string    `json:"Country"`
	Location   *Location `json:"Location"`
}

Address describes an address

type Category

type Category struct {
	ID          string
	Name        string `json:"Name"`
	Description string `json:"Description"`
}

Category describes a product category

type Company

type Company struct {
	ID         string
	Name       string   `json:"Name"`
	ExternalID string   `json:"ExternalId"`
	Phone      string   `json:"Phone,omitempty"`
	Fax        string   `json:"Fax,omitempty"`
	Contact    *Contact `json:"Contact"`
	Address    *Address `json:"Address"`
}

Company describes a company

type Contact

type Contact struct {
	Name  string
	Title string
}

Contact describes a contact

type Employee

type Employee struct {
	ID          string
	LastName    string       `json:"LastName"`
	FirstName   string       `json:"FirstName"`
	Title       string       `json:"Title"`
	Address     *Address     `json:"Address"`
	HiredAt     ravendb.Time `json:"HiredAt"`
	Birthday    ravendb.Time `json:"Birthday"`
	HomePhone   string       `json:"HomePhone"`
	Extension   string       `json:"Extension"`
	ReportsTo   string       `json:"ReportsTo"` // id of Employee struct
	Notes       []string     `json:"Notes"`
	Territories []string     `json:"Territories"`
}

Employee describes an employee

type Location

type Location struct {
	Latitude  float64
	Longitude float64
}

Location describes a location

type Order

type Order struct {
	ID        string
	Company   string        `json:"Company"`  // id of Company struct
	Employee  string        `json:"Employee"` // id of Employee struct
	OrderedAt ravendb.Time  `json:"OrderedAt"`
	RequireAt ravendb.Time  `json:"RequireAt"`
	ShippedAt *ravendb.Time `json:"ShippedAt"`
	ShipTo    *Address      `json:"ShipTo"`
	ShipVia   string        `json:"ShipVia"` // id of Shipper struct
	Freight   float64       `json:"Freight"`
	Lines     []*OrderLine  `json:"Lines"`
}

Order describes an order

type OrderLine

type OrderLine struct {
	Product      string  `json:"Product"` // id of Product string
	ProductName  string  `json:"ProductName"`
	PricePerUnit float64 `json:"PricePerUnit"`
	Quantity     int     `json:"Quantity"`
	Discount     float64 `json:"Discount"`
}

OrderLine describes an order line

type Product

type Product struct {
	ID              string
	Name            string  `json:"Name"`
	Supplier        string  `json:"Supplier"` // id of Supplier struct
	Category        string  `json:"Category"` // id of Category struct
	QuantityPerUnit string  `json:"QuantityPerUnit"`
	PricePerUnit    float64 `json:"PricePerUnit"`
	UnitsInStock    int     `json:"UnitsInStock"`
	UnitsOnOrder    int     `json:"UnitsOnOrder"`
	Discontinued    bool    `json:"Discontinued"`
	ReorderLevel    int     `json:"ReorderLevel"`
}

Product describes a product

type Region

type Region struct {
	ID          string
	Name        string      `json:"Name"`
	Territories []Territory `json:"Territories,omitempty"`
}

Region describes a region

type Shipper

type Shipper struct {
	ID     string
	Name   string `json:"Name"`
	Phoene string `json:"Phone"`
}

Shipper describes a shipper

type Supplier

type Supplier struct {
	ID       string
	Name     string   `json:"Name"`
	Phone    string   `json:"Phone"`
	Fax      string   `json:"Fax,omitempty"`
	HomePage string   `json:"HomePage,omitempty"`
	Contact  *Contact `json:"Contact"`
	Address  *Address `json:"Address"`
}

Supplier describes a supplier

type Territory

type Territory struct {
	Code string `json:"Code"`
	Name string `json:"Name"`
}

Territory describes a territory

Jump to

Keyboard shortcuts

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