-
Notifications
You must be signed in to change notification settings - Fork 2
/
studysegments.go
30 lines (26 loc) · 1.06 KB
/
studysegments.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package types
import "context"
type StudySegmentsRepository interface {
GetByStudySlug(
ctx context.Context,
slug, userID, orgID string,
) ([]SegmentsProgress, error)
}
type SegmentsProgress struct {
Segments []SegmentProgress `json:"segments"`
Datetime int64 `json:"datetime"`
}
type SegmentProgress struct {
ID string `json:"id"`
Name string `json:"name"`
Datetime int64 `json:"datetime"`
CurrentBudget float64 `json:"currentBudget"`
DesiredPercentage float64 `json:"desiredPercentage"`
CurrentPercentage float64 `json:"currentPercentage"`
ExpectedPercentage float64 `json:"expectedPercentage"`
DesiredParticipants *int64 `json:"desiredParticipants"`
ExpectedParticipants int64 `json:"expectedParticipants"`
CurrentParticipants int64 `json:"currentParticipants"`
CurrentPricePerParticipant float64 `json:"currentPricePerParticipant"`
PercentageDeviationFromGoal float64 `json:"percentageDeviationFromGoal"`
}