model

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

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

Go to latest
Published: Nov 27, 2019 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var VendorServiceURL = "http://localhost:4000/api/vendors?type=manufacturing"

Functions

This section is empty.

Types

type Contact

type Contact struct {
	Name  string `json:"name"`
	Phone string `json:"phone"`
}

type Currency

type Currency struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

func GetCurrencies

func GetCurrencies() []*Currency

type PODetail

type PODetail struct {
	ID            int       `json:"id"`
	Line          int       `json:"line"`
	PartNumber    string    `json:"partNumber"`
	Description   string    `json:"description"`
	Quantity      float32   `json:"quantity"`
	DueDate       time.Time `json:"dueDate"`
	UnitOfMeasure string    `json:"unitOfMeasure"`
	PricePer      float64   `json:"pricePer"`
	Status        string    `json:"status"`
}

type PurchaseOrder

type PurchaseOrder struct {
	ID       int         `json:"id"`
	Receiver *Receiver   `json:"receiver"`
	Vendor   *Vendor     `json:"vendor"`
	Currency *Currency   `json:"currency"`
	Purpose  string      `json:"purpose"`
	DueDate  time.Time   `json:"dueDate"`
	Status   string      `json:"status"`
	Details  []*PODetail `json:"details"`
}

func GetOrder

func GetOrder(id int) (*PurchaseOrder, error)

func SaveOrder

func SaveOrder(order *PurchaseOrder) *PurchaseOrder

type Receiver

type Receiver struct {
	ID   int    `json:"id"`
	Name string `json:"name"`
}

func GetReceivers

func GetReceivers() []*Receiver

type ReceiverDto

type ReceiverDto struct {
	ID       int    `json:"id"`
	Location string `json:"location"`
	Type     string `json:"type"`
}

type Vendor

type Vendor struct {
	ID      int      `json:"id"`
	Name    string   `json:"name"`
	Contact *Contact `json:"contact"`
}

func GetVendors

func GetVendors() ([]*Vendor, error)

Jump to

Keyboard shortcuts

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