repository

package
v0.0.0-...-4055fb4 Latest Latest
Warning

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

Go to latest
Published: May 7, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRentalRepository

func NewRentalRepository(db *gorm.DB, logger *zap.Logger) domain.RentalRepository

func NewRentalRepositoryLogger

func NewRentalRepositoryLogger(next domain.RentalRepository, logger *zap.Logger) domain.RentalRepository

func RentalRepositoryMigrate

func RentalRepositoryMigrate(db *gorm.DB)

Types

type Rental

type Rental struct {
	ID        uint           `gorm:"primary_key"`
	CreatedAt time.Time      `gorm:"column:created;autoCreateTime"`
	UpdatedAt time.Time      `gorm:"column:updated;autoUpdateTime"`
	DeletedAt gorm.DeletedAt `gorm:"index"`

	UserID uint `gorm:"column:user_id"`
	User   User

	Name            string
	Description     string
	Type            string
	Make            string  `gorm:"column:vehicle_make"`
	Model           string  `gorm:"column:vehicle_model"`
	Year            int     `gorm:"column:vehicle_year"`
	Length          float64 `gorm:"column:vehicle_length"`
	Sleeps          int
	Price           int    `gorm:"column:price_per_day"`
	City            string `gorm:"column:home_city"`
	State           string `gorm:"column:home_state"`
	Zip             string `gorm:"column:home_zip"`
	Country         string `gorm:"column:home_country"`
	PrimaryImageURL string `gorm:"column:primary_image_url"`
	Lat             float64
	Lng             float64
}

func (*Rental) TableName

func (r *Rental) TableName() string

type User

type User struct {
	gorm.Model

	FirstName string
	LastName  string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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