initial commit

This commit is contained in:
Gitea
2024-01-24 16:12:16 +03:00
commit 5b5dc2165c
23 changed files with 1846 additions and 0 deletions

View File

@ -0,0 +1,23 @@
package entity
import "context"
type GoodsItemRepository interface {
ListIter(context.Context, int) (<-chan GoodsItem, error)
List(context.Context) ([]GoodsItem, error)
Get(context.Context, string) (GoodsItem, error)
GetByCart(context.Context, int64) (GoodsItem, error)
UpsertMany(context.Context, ...GoodsItem) ([]GoodsItem, error)
}
type CategoryRepository interface {
List(context.Context) ([]Category, error)
Get(context.Context, int64) (Category, error)
Create(ctx context.Context, name string) (Category, error)
}
type Mapper interface {
CategoryNameToID(context.Context, string) (int64, error)
}