55 lines
1.2 KiB
Go
55 lines
1.2 KiB
Go
|
|
package usecase
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
)
|
||
|
|
|
||
|
|
type PersonaSummary struct {
|
||
|
|
ID string
|
||
|
|
DisplayName string
|
||
|
|
Persona string
|
||
|
|
Brief string
|
||
|
|
ProductBrief string
|
||
|
|
TargetAudience string
|
||
|
|
Goals string
|
||
|
|
StyleProfile string
|
||
|
|
StyleBenchmark string
|
||
|
|
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
|
||
|
|
}
|
||
|
|
|
||
|
|
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
|
||
|
|
}
|