models

package
v0.0.0-...-5aec259 Latest Latest
Warning

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

Go to latest
Published: Jul 15, 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 {
	gorm.Model
	Name         string     `json:"name"`
	AdressLine1  string     `json:"addressLine1"`
	AdressLine2  string     `json:"addressLine2"`
	SubDistrict  string     `json:"subDistrict"`
	Village      string     `json:"village"`
	City         string     `json:"city"`
	Province     string     `json:"province"`
	Country      string     `json:"country"`
	ZipCode      int        `json:"zipCode"`
	Coordinate   Coordinate `json:"coordinate"`
	OtherDetails string     `json:"otherDetails"`
	CustomerID   uint
}

Address containts address(es) of customer

type Contact

type Contact struct {
	gorm.Model
	Name         string `json:"name"`
	Title        string `json:"title"`
	Phone        string `json:"phone"`
	Phone2       string `json:"phone2"`
	Phone3       string `json:"phone3"`
	Email        string `json:"email"`
	OtherDetails string `json:"otherDetails"`
	CustomerID   uint
}

Contact containts contact(s) of customer

type Coordinate

type Coordinate struct {
	gorm.Model
	Latitude  float64 `json:"lat"`
	Longitude float64 `json:"lng"`
	AddressID uint
}

Coordinate containts Latitude and Longitude

type Customer

type Customer struct {
	gorm.Model
	Name         string    `json:"name"`
	Adress       []Address `json:"addresses"`
	Contact      []Contact `json:"contacts"`
	OtherDetails string    `json:"otherDetails"`
}

Customer containts customer data

Jump to

Keyboard shortcuts

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