72 lines
1.6 KiB
Go
72 lines
1.6 KiB
Go
|
|
package usecase
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
|
||
|
|
"haixun-backend/internal/model/persona/domain/entity"
|
||
|
|
)
|
||
|
|
|
||
|
|
type CopyResearchMapSummary struct {
|
||
|
|
AudienceSummary string
|
||
|
|
ContentGoal string
|
||
|
|
Questions []string
|
||
|
|
Pillars []string
|
||
|
|
Exclusions []string
|
||
|
|
SuggestedTags []string
|
||
|
|
BenchmarkNotes string
|
||
|
|
}
|
||
|
|
|
||
|
|
type PersonaSummary struct {
|
||
|
|
ID string
|
||
|
|
DisplayName string
|
||
|
|
Persona string
|
||
|
|
Brief string
|
||
|
|
ProductBrief string
|
||
|
|
TargetAudience string
|
||
|
|
Goals string
|
||
|
|
StyleProfile string
|
||
|
|
StyleBenchmark string
|
||
|
|
SeedQuery string
|
||
|
|
CopyResearchMap CopyResearchMapSummary
|
||
|
|
CreateAt int64
|
||
|
|
UpdateAt int64
|
||
|
|
}
|
||
|
|
|
||
|
|
type CreateRequest struct {
|
||
|
|
TenantID string
|
||
|
|
OwnerUID string
|
||
|
|
DisplayName string
|
||
|
|
}
|
||
|
|
|
||
|
|
type UpdateRequest struct {
|
||
|
|
TenantID string
|
||
|
|
OwnerUID string
|
||
|
|
PersonaID string
|
||
|
|
Patch PersonaPatch
|
||
|
|
}
|
||
|
|
|
||
|
|
type PersonaPatch struct {
|
||
|
|
DisplayName *string
|
||
|
|
Persona *string
|
||
|
|
Brief *string
|
||
|
|
ProductBrief *string
|
||
|
|
TargetAudience *string
|
||
|
|
Goals *string
|
||
|
|
StyleProfile *string
|
||
|
|
StyleBenchmark *string
|
||
|
|
SeedQuery *string
|
||
|
|
CopyResearchMap *entity.CopyResearchMap
|
||
|
|
}
|
||
|
|
|
||
|
|
type ListResult struct {
|
||
|
|
List []PersonaSummary
|
||
|
|
}
|
||
|
|
|
||
|
|
type UseCase interface {
|
||
|
|
List(ctx context.Context, tenantID, ownerUID string) (*ListResult, error)
|
||
|
|
Create(ctx context.Context, req CreateRequest) (*PersonaSummary, error)
|
||
|
|
Get(ctx context.Context, tenantID, ownerUID, personaID string) (*PersonaSummary, error)
|
||
|
|
Update(ctx context.Context, req UpdateRequest) (*PersonaSummary, error)
|
||
|
|
Delete(ctx context.Context, tenantID, ownerUID, personaID string) error
|
||
|
|
}
|