Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Rental ¶
type Rental struct { ID int `json:"id"` Name string `json:"name"` Description string `json:"description"` Type string `json:"type"` Make string `json:"make"` Model string `json:"model"` Year int `json:"year"` Length float64 `json:"length"` Sleeps int `json:"sleeps"` PrimaryImageURL string `json:"primary_image_url"` Price RentalPrice `json:"price"` Location RentalLocation `json:"location"` User models.User `json:"user"` }
type RentalLocation ¶
type RentalPrice ¶
type RentalPrice struct {
Day int `json:"day"`
}
type RentalQuery ¶
func NewRentalQuery ¶
func NewRentalQuery(db *gorm.DB) *RentalQuery
NewRentalQuery returns a new RentalQuery struct
func (*RentalQuery) FindRentals ¶
func (q *RentalQuery) FindRentals() ([]models.Rental, error)
FindRentals returns a list of rentals
Click to show internal directories.
Click to hide internal directories.