wishlist

package
v0.0.0-...-247c3a5 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBookingNotAvailable = errors.New("item's booking not available")
View Source
var ErrItemAlreadyBooked = errors.New("item already booked")
View Source
var ErrItemBookedByAnotherUser = errors.New("item booked by another user")
View Source
var ErrItemNotFound = errors.New("wishlist item not found")
View Source
var ErrNotFound = errors.New("wishlist not found")

Functions

This section is empty.

Types

type ID

type ID string

type Item

type Item struct {
	ID                 ItemID
	IsBookingAvailable bool
	IsBookedBy         *user.ID
	CreatedAt          time.Time
	UpdatedAt          time.Time
}

type ItemID

type ItemID struct {
	WishlistID ID         `json:"wishlist_id"`
	ProductID  product.ID `json:"product_id"`
}

type Wishlist

type Wishlist struct {
	ID          ID
	UserID      user.ID
	IsDefault   bool
	Title       string
	Avatar      *image.ID
	Description string
	IsArchived  bool
	CreatedAt   time.Time
	UpdatedAt   time.Time
}

type Wishlists

type Wishlists []*Wishlist

func (Wishlists) GetDefault

func (w Wishlists) GetDefault() *Wishlist

Directories

Path Synopsis
storage

Jump to

Keyboard shortcuts

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