thread-master/apps/backend/internal/module/inspire/usecase/context_sources.go

47 lines
1.1 KiB
Go
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

package usecase
import "context"
// PersonaSnapshot — 靈感 prompt 注入用的完整人設(不含 API key
type PersonaSnapshot struct {
ID string
Name string
Brief string
Status string
DraftText string
Voice string
GuardAvoid []string
MaxChars int
BanAiTone bool
// DimSummaries key like d1Tone → summary
DimSummaries map[string]string
}
// BrandSnapshot + products for catalog injection.
type BrandSnapshot struct {
ID string
DisplayName string
Brief string
Audience string
Goals string
Products []ProductSnapshot
}
type ProductSnapshot struct {
ID string
Label string
Context string
Tags []string
Pains []string
}
// PersonaSource resolves current / requested persona.
type PersonaSource interface {
ResolvePersona(ctx context.Context, ownerUID int64, personaID string) (*PersonaSnapshot, error)
}
// BrandCatalogSource lists brands and nested products for the owner.
type BrandCatalogSource interface {
ListCatalog(ctx context.Context, ownerUID int64) ([]BrandSnapshot, error)
}