Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AddressRepo ¶
AddressRepo defines data access operations for addresses.
func NewAddressRepo ¶
func NewAddressRepo(db *gorm.DB) AddressRepo
type CartRepo ¶
type CartRepo interface {
FindByIDsAndUser(ids []uint, userID uint) ([]model.Cart, error)
DeleteByIDsAndUser(tx *gorm.DB, ids []uint, userID uint) error
}
CartRepo defines data access operations for cart.
func NewCartRepo ¶
type OrderRepo ¶
type OrderRepo interface {
GetByID(id uint) (*model.Order, error)
GetByUserAndID(userID, id uint) (*model.Order, error)
List(userID uint, status *int8, offset, limit int) ([]model.Order, int64, error)
Create(tx *gorm.DB, order *model.Order) error
UpdateStatus(tx *gorm.DB, id uint, status int8) error
}
OrderRepo defines data access operations for orders.
func NewOrderRepo ¶
Click to show internal directories.
Click to hide internal directories.