rent

package
v0.0.0-...-d4bccd0 Latest Latest
Warning

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

Go to latest
Published: Apr 1, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type RentRepository

type RentRepository struct {
	// contains filtered or unexported fields
}

func (*RentRepository) AddRent

func (r *RentRepository) AddRent(rent _entities.Rent) (_entities.Rent, error)

func (*RentRepository) Delete

func (r *RentRepository) Delete(id uint) error

func (*RentRepository) GetAll

func (r *RentRepository) GetAll() ([]_entities.Rent, error)

func (*RentRepository) GetByBook

func (r *RentRepository) GetByBook(id uint) ([]_entities.Rent, error)

func (*RentRepository) GetByID

func (r *RentRepository) GetByID(id uint) (_entities.Rent, error)

func (*RentRepository) GetByUser

func (r *RentRepository) GetByUser(id uint) ([]_entities.Rent, error)

func (*RentRepository) GetOneByUser

func (r *RentRepository) GetOneByUser(bookId uint, userId uint) (_entities.Rent, error)

func (*RentRepository) HasRent

func (r *RentRepository) HasRent(book uint) (bool, error)

func (*RentRepository) Update

func (r *RentRepository) Update(rent _entities.Rent) (_entities.Rent, error)

type RentRepositoryInterface

type RentRepositoryInterface interface {
	GetAll() ([]_entities.Rent, error)
	GetByID(id uint) (_entities.Rent, error)
	GetByBook(id uint) ([]_entities.Rent, error)
	GetByUser(id uint) ([]_entities.Rent, error)
	GetOneByUser(bookId uint, userId uint) (_entities.Rent, error)
	AddRent(rent _entities.Rent) (_entities.Rent, error)
	Update(rent _entities.Rent) (_entities.Rent, error)
	Delete(id uint) error
	HasRent(book uint) (bool, error)
}

func NewRentRepository

func NewRentRepository(db *gorm.DB, redis *redis.Client) RentRepositoryInterface

Jump to

Keyboard shortcuts

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