-
-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathdonations.go
More file actions
39 lines (29 loc) · 953 Bytes
/
donations.go
File metadata and controls
39 lines (29 loc) · 953 Bytes
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
31
32
33
34
35
36
37
38
39
package kilonova
import "time"
type DonationSource string
const (
DonationSourceUnknown DonationSource = ""
DonationSourceBMAC DonationSource = "buymeacoffee"
DonationSourcePaypal DonationSource = "paypal"
DonationSourceStripe DonationSource = "stripe"
DonationSourceOther DonationSource = "other"
)
type DonationType string
const (
DonationTimeUnknown DonationType = ""
DonationTypeOneTime DonationType = "onetime"
DonationTypeMonthly DonationType = "monthly"
DonationTypeYearly DonationType = "yearly"
)
type Donation struct {
ID int `json:"id"`
DonatedAt time.Time `json:"donated_at"`
User *UserBrief `json:"user"`
Amount float64 `json:"amount"`
Currency string `json:"currency"`
Source DonationSource `json:"source"`
Type DonationType `json:"type"`
RealName string `json:"real_name"`
TransactionID string `json:"transaction_id"`
CancelledAt *time.Time `json:"cancelled_at"`
}