37 lines
670 B
Go
37 lines
670 B
Go
|
|
package usecase
|
||
|
|
|
||
|
|
import (
|
||
|
|
"context"
|
||
|
|
)
|
||
|
|
|
||
|
|
type DraftItem struct {
|
||
|
|
Text string
|
||
|
|
Angle string
|
||
|
|
Rationale string
|
||
|
|
}
|
||
|
|
|
||
|
|
type DraftSummary struct {
|
||
|
|
ID string
|
||
|
|
BrandID string
|
||
|
|
ScanPostID string
|
||
|
|
Relevance float64
|
||
|
|
Reason string
|
||
|
|
Drafts []DraftItem
|
||
|
|
CreateAt int64
|
||
|
|
}
|
||
|
|
|
||
|
|
type CreateRequest struct {
|
||
|
|
TenantID string
|
||
|
|
OwnerUID string
|
||
|
|
BrandID string
|
||
|
|
ScanPostID string
|
||
|
|
Relevance float64
|
||
|
|
Reason string
|
||
|
|
Drafts []DraftItem
|
||
|
|
}
|
||
|
|
|
||
|
|
type UseCase interface {
|
||
|
|
Create(ctx context.Context, req CreateRequest) (*DraftSummary, error)
|
||
|
|
GetLatestByScanPost(ctx context.Context, tenantID, ownerUID, brandID, scanPostID string) (*DraftSummary, error)
|
||
|
|
}
|