package models import "time" type History struct { ID string `json:"id" bson:"_id,omitempty"` UserID string `json:"userId" bson:"userId"` Comment string `json:"comment" bson:"comment"` Type HistoryType `json:"type" bson:"type"` RawDetails string `json:"rawDetails" bson:"rawDetails"` BuyCartDetails *BuyCartDetails `json:"buyCartDetails,omitempty" bson:"buyCartDetails,omitempty"` DeclinedPaymentDetails *DeclinedPaymentDetails `json:"declinedPaymentDetails,omitempty" bson:"declinedPaymentDetails,omitempty"` SubsriptionEndDetails *SubsriptionEndDetails `json:"subsriptionEndDetails,omitempty" bson:"subsriptionEndDetails,omitempty"` SuccessfulPaymentDetails *SuccessfulPaymentDetails `json:"successfulPaymentDetails,omitempty" bson:"successfulPaymentDetails,omitempty"` TimeoutPaymentDetails *TimeoutPaymentDetails `json:"timeoutPaymentDetails,omitempty" bson:"timeoutPaymentDetails,omitempty"` Deleted bool `json:"deleted" bson:"deleted"` CreatedAt time.Time `json:"createdAt" bson:"createdAt"` UpdatedAt time.Time `json:"updatedAt" bson:"updatedAt"` DeletedAt *time.Time `json:"deletedAt,omitempty" bson:"deletedAt,omitempty"` } type BuyCartDetails struct{} type DeclinedPaymentDetails struct{} type SubsriptionEndDetails struct{} type SuccessfulPaymentDetails struct{} type TimeoutPaymentDetails struct{} type HistoryType string const ( BuyCart HistoryType = "buyCart" DeclinedPayment HistoryType = "declinedPayment" SubsriptionEnd HistoryType = "subsriptionEnd" SuccessfulPayment HistoryType = "successfulPayment" TimeoutPayment HistoryType = "timeoutPayment" )