39 lines
721 B
Go
39 lines
721 B
Go
package usecase
|
|
|
|
import (
|
|
"context"
|
|
)
|
|
|
|
type Row struct {
|
|
SortOrder int
|
|
SearchTag string
|
|
Angle string
|
|
Hook string
|
|
Text string
|
|
ReferenceNotes string
|
|
SourcePermalinks []string
|
|
Rationale string
|
|
}
|
|
|
|
type MatrixSummary struct {
|
|
ID string
|
|
BrandID string
|
|
Rows []Row
|
|
GeneratedAt int64
|
|
CreateAt int64
|
|
UpdateAt int64
|
|
}
|
|
|
|
type UpsertRequest struct {
|
|
TenantID string
|
|
OwnerUID string
|
|
BrandID string
|
|
Rows []Row
|
|
GeneratedAt int64
|
|
}
|
|
|
|
type UseCase interface {
|
|
Get(ctx context.Context, tenantID, ownerUID, brandID string) (*MatrixSummary, error)
|
|
Upsert(ctx context.Context, req UpsertRequest) (*MatrixSummary, error)
|
|
}
|