diff --git a/pkg/api/core/interface.go b/pkg/api/core/interface.go index a99b2c8f..6e242bad 100644 --- a/pkg/api/core/interface.go +++ b/pkg/api/core/interface.go @@ -22,22 +22,9 @@ type User struct { MailToken string `json:"mail_token"` } -type Payment struct { - gorm.Model - Group *Group `json:"group"` - GroupID *uint `json:"group_id"` - PaymentIntentID string `json:"payment_intent_id"` - Type uint `json:"type"` - Paid *bool `json:"paid"` - Refund *bool `json:"refund"` - Fee uint `json:"fee"` - Comment string `json:"comment"` -} - type Group struct { gorm.Model Users []User `json:"users"` - Payment Payment `json:"payment_membership"` Services []Service `json:"services"` Tickets []Ticket `json:"tickets"` Memos []Memo `json:"memos"` diff --git a/pkg/api/core/payment/interface.go b/pkg/api/core/payment/interface.go index 13b6a616..a6f7904c 100644 --- a/pkg/api/core/payment/interface.go +++ b/pkg/api/core/payment/interface.go @@ -1,14 +1,5 @@ package payment -import "github.com/homenoc/dsbd-backend/pkg/api/core" - -const ( - ID = 0 - PaymentIntentID = 1 - UpdatePaid = 140 - UpdateAll = 150 -) - type Input struct { Plan string `json:"plan"` // yearly, monthly } @@ -17,10 +8,6 @@ type ChangeCardPaymentInit struct { PaymentMethodID string `json:"payment_method_id"` } -type ResultByAdmin struct { - Payment []core.Payment `json:"payment"` -} - type ResultByUser struct { ClientSecret string `json:"client_secret"` } diff --git a/pkg/api/store/store.go b/pkg/api/store/store.go index 32a935b6..5e700079 100644 --- a/pkg/api/store/store.go +++ b/pkg/api/store/store.go @@ -45,7 +45,6 @@ func InitDB() { &core.Chat{}, &core.Token{}, &core.Notice{}, - &core.Payment{}, ) log.Println(result) }