-
Notifications
You must be signed in to change notification settings - Fork 7
/
Copy pathfeatured_selection.go
36 lines (32 loc) · 1019 Bytes
/
featured_selection.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package anor
import (
"context"
"github.com/jackc/pgx/v5/pgtype"
"time"
)
// FeaturedSelection represents a highlighted item or group of items.
// It can be used in various contexts, such as:
// - Banner carousel items on the home page
// - Highlighted categories of products
// - Curated search results with specific filters and sorting
// - Single product promotions
// - External links to campaigns or special offers
//
// FeaturedSelections are versatile and can represent either a group of products,
// a single product, or an external link, depending on the context and configuration.
type FeaturedSelection struct {
ID int64
ResourcePath string
BannerInfo map[string]string
ImageUrl string
QueryParams map[string]string
StartDate time.Time
EndDate time.Time
DisplayOrder int
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
Products []Product
}
type FeaturedSelectionService interface {
ListAllActive(ctx context.Context) ([]FeaturedSelection, error)
}