mirror of
https://github.com/Wei-Shaw/sub2api.git
synced 2026-11-21 07:08:20 +00:00
Merge feature/payment into release/custom-0.1.108
集成支付系统(EasyPay、Alipay、WxPay、Stripe),包含完整的订单管理、 Webhook 回调、管理后台仪表盘和用户充值/订阅流程。
This commit is contained in:
commit
c69929bbb7
127 files changed
+36376
-163
No files matched your search
+18
-2
@@ -71,11 +71,13 @@ type UserEdges struct {
|
||||
AttributeValues []*UserAttributeValue `json:"attribute_values,omitempty"`
|
||||
// PromoCodeUsages holds the value of the promo_code_usages edge.
|
||||
PromoCodeUsages []*PromoCodeUsage `json:"promo_code_usages,omitempty"`
|
||||
// PaymentOrders holds the value of the payment_orders edge.
|
||||
PaymentOrders []*PaymentOrder `json:"payment_orders,omitempty"`
|
||||
// UserAllowedGroups holds the value of the user_allowed_groups edge.
|
||||
UserAllowedGroups []*UserAllowedGroup `json:"user_allowed_groups,omitempty"`
|
||||
// loadedTypes holds the information for reporting if a
|
||||
// type was loaded (or requested) in eager-loading or not.
|
||||
loadedTypes [10]bool
|
||||
loadedTypes [11]bool
|
||||
}
|
||||
|
||||
// APIKeysOrErr returns the APIKeys value or an error if the edge
|
||||
@@ -159,10 +161,19 @@ func (e UserEdges) PromoCodeUsagesOrErr() ([]*PromoCodeUsage, error) {
|
||||
return nil, &NotLoadedError{edge: "promo_code_usages"}
|
||||
}
|
||||
|
||||
// PaymentOrdersOrErr returns the PaymentOrders value or an error if the edge
|
||||
// was not loaded in eager-loading.
|
||||
func (e UserEdges) PaymentOrdersOrErr() ([]*PaymentOrder, error) {
|
||||
if e.loadedTypes[9] {
|
||||
return e.PaymentOrders, nil
|
||||
}
|
||||
return nil, &NotLoadedError{edge: "payment_orders"}
|
||||
}
|
||||
|
||||
// UserAllowedGroupsOrErr returns the UserAllowedGroups value or an error if the edge
|
||||
// was not loaded in eager-loading.
|
||||
func (e UserEdges) UserAllowedGroupsOrErr() ([]*UserAllowedGroup, error) {
|
||||
if e.loadedTypes[9] {
|
||||
if e.loadedTypes[10] {
|
||||
return e.UserAllowedGroups, nil
|
||||
}
|
||||
return nil, &NotLoadedError{edge: "user_allowed_groups"}
|
||||
@@ -349,6 +360,11 @@ func (_m *User) QueryPromoCodeUsages() *PromoCodeUsageQuery {
|
||||
return NewUserClient(_m.config).QueryPromoCodeUsages(_m)
|
||||
}
|
||||
|
||||
// QueryPaymentOrders queries the "payment_orders" edge of the User entity.
|
||||
func (_m *User) QueryPaymentOrders() *PaymentOrderQuery {
|
||||
return NewUserClient(_m.config).QueryPaymentOrders(_m)
|
||||
}
|
||||
|
||||
// QueryUserAllowedGroups queries the "user_allowed_groups" edge of the User entity.
|
||||
func (_m *User) QueryUserAllowedGroups() *UserAllowedGroupQuery {
|
||||
return NewUserClient(_m.config).QueryUserAllowedGroups(_m)
|
||||
|
||||
Reference in new issue
Block a user