delivery

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Delivery

type Delivery struct {
	Id            int64     `db:"ID" structs:"-"`
	SourceId      int64     `db:"SOURCE_ID" structs:"source_id"`
	DestinationId int64     `db:"DESTINATION_ID" structs:"destination_id"`
	Price         float64   `db:"PRICE" structs:"price"`
	Date          time.Time `db:"DATE" structs:"date"`
}

type Query

type Query interface {
	New() Query

	Get() (*Delivery, error)
	Select() ([]Delivery, error)

	Insert(Delivery) (Delivery, error)
	Update(Delivery) (Delivery, error)
	Delete(id int64) error

	Page(pageParams pgdb.OffsetPageParams) Query

	FilterById(ids ...int64) Query
	FilterBySourceId(ids ...int64) Query
	FilterByDestinationId(ids ...int64) Query
	FilterByPrice(prices ...float64) Query
	FilterByDate(dates ...time.Time) Query
}

func NewQuery

func NewQuery(db *sqlx.DB) Query

Jump to

Keyboard shortcuts

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