2024-05-12 21:07:25 +00:00
|
|
|
package storage
|
|
|
|
|
2024-05-18 05:12:00 +00:00
|
|
|
import (
|
|
|
|
crm "cake_crm/proto"
|
|
|
|
"context"
|
|
|
|
)
|
2024-05-12 21:07:25 +00:00
|
|
|
|
|
|
|
type Product struct {
|
|
|
|
ID int `json:"id"`
|
|
|
|
Name string `json:"name"`
|
|
|
|
// todo
|
|
|
|
}
|
|
|
|
|
|
|
|
type Breadcrumb struct {
|
|
|
|
Name string `json:"name"`
|
|
|
|
URL string `json:"url"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type IStorage interface {
|
2024-05-18 05:36:31 +00:00
|
|
|
GetCatalog(ctx context.Context) ([]*crm.Category, error)
|
|
|
|
GetPositions(ctx context.Context, id int64) ([]*crm.Product, error)
|
2024-05-12 21:07:25 +00:00
|
|
|
}
|