-
-
Notifications
You must be signed in to change notification settings - Fork 100
/
Copy pathtypes.go
58 lines (49 loc) · 1.74 KB
/
types.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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package payment
import "time"
// Model is base for database struct
type Model struct {
ID uint64 `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created_at" gorm:"not null;"`
UpdatedAt time.Time `json:"updated_at" gorm:"not null;"`
DeletedAt *time.Time `json:"deleted_at" sql:"index"`
}
// PaymentType represent the payment method name
type PaymentType string
const (
SourceCreditCard PaymentType = "credit_card"
SourceBNIVA PaymentType = "bni_va"
SourcePermataVA PaymentType = "permata_va"
SourceBCAVA PaymentType = "bca_va"
SourceOtherVA PaymentType = "other_va"
SourceAlfamart PaymentType = "alfamart"
SourceGopay PaymentType = "gopay"
SourceAkulaku PaymentType = "akulaku"
SourceOvo PaymentType = "ovo"
SourceDana PaymentType = "dana"
SourceLinkAja PaymentType = "linkaja"
SourceShopeePay PaymentType = "shopeepay"
SourceQRIS PaymentType = "qris"
SourceBRIVA PaymentType = "bri_va"
SourceMandiriVA PaymentType = "mandiri_va"
)
// Bank is a bank
type Bank string
const (
BankBCA Bank = "bca"
BankBNI Bank = "bni"
BankBRI Bank = "bri"
)
// InstallmentType shows the type of installment.
type InstallmentType string
const (
// InstallmentOnline used if the cardholder's card is the same as the the bank providing the installment
InstallmentOnline InstallmentType = "online"
// InstallmentOffline used if the cardholders's card might not be the same as the bank providing the installment
InstallmentOffline InstallmentType = "offline"
)
// Money is just notation for showing the money value and its currency
type Money struct {
Value float64 `json:"value"`
ValuePerMonth float64 `json:"value_per_month,omitempty"`
Currency string `json:"curency"`
}