generated from PenaSide/GolangTemplate
26 lines
858 B
Go
26 lines
858 B
Go
![]() |
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"
|
||
|
)
|