32 lines
711 B
Go
32 lines
711 B
Go
|
|
package usecase
|
||
|
|
|
||
|
|
import "context"
|
||
|
|
|
||
|
|
type EventSummary struct {
|
||
|
|
ID string
|
||
|
|
QueueID string
|
||
|
|
AccountID string
|
||
|
|
EventType string
|
||
|
|
FromStatus string
|
||
|
|
ToStatus string
|
||
|
|
Message string
|
||
|
|
CreateAt int64
|
||
|
|
}
|
||
|
|
|
||
|
|
type RecordRequest struct {
|
||
|
|
TenantID string
|
||
|
|
OwnerUID string
|
||
|
|
AccountID string
|
||
|
|
QueueID string
|
||
|
|
EventType string
|
||
|
|
FromStatus string
|
||
|
|
ToStatus string
|
||
|
|
Message string
|
||
|
|
}
|
||
|
|
|
||
|
|
type UseCase interface {
|
||
|
|
Record(ctx context.Context, req RecordRequest) error
|
||
|
|
ListByQueue(ctx context.Context, tenantID, ownerUID, accountID, queueID string, limit int) ([]EventSummary, error)
|
||
|
|
ListRecentByAccount(ctx context.Context, tenantID, ownerUID, accountID string, limit int) ([]EventSummary, error)
|
||
|
|
}
|