haixunMaster/haixun-backend/internal/model/placement_topic/domain/usecase/usecase.go

69 lines
1.5 KiB
Go
Raw Normal View History

2026-06-24 16:48:56 +00:00
package usecase
import (
"context"
brandentity "haixun-backend/internal/model/brand/domain/entity"
)
type TopicSummary struct {
ID string
BrandID string
BrandDisplayName string
TopicName string
SeedQuery string
Brief string
ProductID string
ResearchMap brandentity.ResearchMap
CreateAt int64
UpdateAt int64
}
type CreateRequest struct {
TenantID string
OwnerUID string
BrandID string
TopicName string
SeedQuery string
Brief string
ProductID string
}
type UpdateRequest struct {
TenantID string
OwnerUID string
TopicID string
Patch TopicPatch
}
type TopicPatch struct {
BrandID *string
TopicName *string
SeedQuery *string
Brief *string
ProductID *string
AudienceSummary *string
ContentGoal *string
Questions []string
QuestionsSet bool
Pillars []string
PillarsSet bool
Exclusions []string
ExclusionsSet bool
PatrolKeywords []string
PatrolKeywordsSet bool
ResearchMap *brandentity.ResearchMap
}
type ListResult struct {
List []TopicSummary
}
type UseCase interface {
List(ctx context.Context, tenantID, ownerUID string) (*ListResult, error)
Create(ctx context.Context, req CreateRequest) (*TopicSummary, error)
Get(ctx context.Context, tenantID, ownerUID, topicID string) (*TopicSummary, error)
Update(ctx context.Context, req UpdateRequest) (*TopicSummary, error)
Delete(ctx context.Context, tenantID, ownerUID, topicID string) error
}