2026-06-27 16:03:28 +00:00
|
|
|
package usecase
|
|
|
|
|
|
|
|
|
|
import "context"
|
|
|
|
|
|
|
|
|
|
type PublishAnalyticsSummary struct {
|
|
|
|
|
ID string
|
|
|
|
|
MediaID string
|
|
|
|
|
Permalink string
|
|
|
|
|
PublishedAt int64
|
|
|
|
|
Checkpoint string
|
|
|
|
|
LikeCount int
|
|
|
|
|
ReplyCount int
|
|
|
|
|
RepostCount int
|
|
|
|
|
QuoteCount int
|
2026-06-30 07:09:44 +00:00
|
|
|
ViewCount int
|
|
|
|
|
ShareCount int
|
2026-06-27 16:03:28 +00:00
|
|
|
ImpressionCount int
|
|
|
|
|
ReachCount int
|
|
|
|
|
CheckedAt int64
|
|
|
|
|
CreateAt int64
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-30 07:09:44 +00:00
|
|
|
type ScheduleCheckpointsRequest struct {
|
|
|
|
|
TenantID string
|
|
|
|
|
OwnerUID string
|
|
|
|
|
AccountID string
|
|
|
|
|
MediaID string
|
|
|
|
|
Permalink string
|
|
|
|
|
PublishedAt int64
|
|
|
|
|
}
|
|
|
|
|
|
2026-06-27 16:03:28 +00:00
|
|
|
type UseCase interface {
|
|
|
|
|
RecordCheckpoint(ctx context.Context, tenantID, ownerUID string, summary PublishAnalyticsSummary) (*PublishAnalyticsSummary, error)
|
|
|
|
|
ListByMedia(ctx context.Context, tenantID, ownerUID, mediaID string) ([]PublishAnalyticsSummary, error)
|
2026-06-30 07:09:44 +00:00
|
|
|
ScheduleCheckpoints(ctx context.Context, req ScheduleCheckpointsRequest) error
|
2026-06-27 16:03:28 +00:00
|
|
|
}
|