models

package
v0.0.0-...-a3eebca Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2021 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 Address

type Address struct {
	StreetAddress1 string    `bson:"street_address_1" json:"street_address_1"`
	StreetAddress2 string    `bson:"street_address_2" json:"street_address_2"`
	City           string    `bson:"city" json:"city"`
	State          string    `bson:"state" json:"state"`
	Country        string    `bson:"country" json:"country"`
	Landmark       string    `bson:"landmark" json:"landmark"`
	ZipCode        string    `bson:"zip_code" json:"zip_code"`
	Coordinates    []float64 `bson:"coordinates,omitempty" json:"coordinates,omitempty"`
}

type Contact

type Contact struct {
	ContactPerson string        `bson:"contact_person" json:"contact_person"`
	Email         string        `bson:"email" json:"email"`
	Number        string        `bson:"number" json:"number"`
	Address       Address       `bson:"address" json:"address"`
	Other         []interface{} `bson:"other" json:"other"`
	Website       string        `bson:"website" json:"website"`
}

type Location

type Location struct {
	Type        string                 `json:"type" bson:"type"`
	Coordinates []interface{}          `json:"coordinates" bson:"coordinates"`
	Properties  map[string]interface{} `json:"properties" bson:"properties"`
}

type ServiceProvider

type ServiceProvider struct {
	ID            primitive.ObjectID `bson:"_id" json:"id"`
	Contact       Contact            `bson:"contact"        json:"contact"`
	Name          string             `bson:"name" json:"name"`
	ServiceType   string             `bson:"service_type"   json:"service_type"`
	FeeRange      string             `bson:"fee_range"      json:"fee_range"`
	FeeNegotiable string             `bson:"fee_negotiable" json:"fee_negotiable"`
	Timings       string             `bson:"timings" json:"timings"`
	Online        bool               `bson:"online" json:"online"`
	Declaration   bool               `bson:"declaration" json:"-"`
	Approved      bool               `bson:"approved" json:"-"`
	Location      Location           `bson:"location" json:"-"`
	CreatedAt     time.Time          `bson:"created_at" json:"-"`
	UpdatedAt     time.Time          `bson:"updated_at" json:"-"`
}

type ServiceProviderRequestParams

type ServiceProviderRequestParams struct {
	Online        bool
	Start         int64
	Limit         int64
	Location      bool
	LocationQuery struct {
		Geometery struct {
			Lat float64
			Lon float64
		}
		MaxDistance float64
	}
}

Jump to

Keyboard shortcuts

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