customer/internal/models/history.go

26 lines
858 B
Go
Raw Normal View History

2023-05-23 10:52:27 +00:00
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"`
Subject string `json:"subject" bson:"subject"`
Type HistoryType `json:"type" bson:"type"`
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 HistoryType string
const (
BuyCart HistoryType = "buyCart"
DeclinedPayment HistoryType = "declinedPayment"
SubsriptionEnd HistoryType = "subsriptionEnd"
SuccessfulPayment HistoryType = "successfulPayment"
TimeoutPayment HistoryType = "timeoutPayment"
)