/
membership-info.go
34 lines (30 loc) · 1.23 KB
/
membership-info.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
package types
import (
"fmt"
"time"
)
// MembershipInfo represents the gql MembershipInfo type.
type MembershipInfo struct {
State string `json:"state"`
PlanName string `json:"planName"`
Period int `json:"period"`
StartDate time.Time `json:"startDate"`
EndDate time.Time `json:"endDate"`
MemberGPQuota float64 `json:"memberGPQuota"`
CoinPerGP float64 `json:"coinPerGP"`
AssetStorage float64 `json:"assetStorage"`
Visibility []string `json:"visibility"`
Coupon MembershipPlanCoupon `json:"coupon"`
ModelPerProject int `json:"modelPerProject"`
CollaboratorQuota int `json:"collaboratorQuota"`
ForceWatermark bool `json:"forceWaterMark"`
}
// MembershipPlanCoupon represents the gql MEMBERSHIP_PLAN_COUPON type.
type MembershipPlanCoupon struct {
Value int `json:"value"`
Repeat int `json:"repeat"`
ValidMonth int `json:"validMonth"`
}
func (c MembershipPlanCoupon) String() string {
return fmt.Sprintf("Value: %d\nRepeat: %d\nMonth: %d", c.Value, c.Repeat, c.ValidMonth)
}