You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
856 B
Go
20 lines
856 B
Go
package purchase
|
|
|
|
// Repository 购买记录仓储接口
|
|
type Repository interface {
|
|
// Save 保存购买记录
|
|
Save(purchase *Purchase) error
|
|
// FindByUserIdAndContent 根据用户ID和内容ID查找购买记录
|
|
FindByUserIdAndContent(userId, contentId uint64, contentType ContentType) (*Purchase, error)
|
|
// FindByUserId 查找用户的所有购买记录
|
|
FindByUserId(userId uint64) ([]*Purchase, error)
|
|
FindColumnById(uid uint64, ids ...uint64) ([]*Purchase, error)
|
|
FindArticleById(uid uint64, ids ...uint64) ([]*Purchase, error)
|
|
FindArticlesByUserId(userId uint64) ([]*Purchase, error)
|
|
FindColumnsByUserId(userId uint64) ([]*Purchase, error)
|
|
|
|
// FindByContent 查找内容的所有购买记录
|
|
FindByContent(contentId uint64, contentType ContentType) ([]*Purchase, error)
|
|
FindColumnWithId(uid uint64, contentId uint64) (*Purchase, error)
|
|
}
|