qor-example icon indicating copy to clipboard operation
qor-example copied to clipboard

Is here a bug in order_item.go?

Open goodforever opened this issue 7 years ago • 1 comments

No State field type OrderItem struct { gorm.Model OrderID uint SizeVariationID uint cartitem:"SizeVariationID" SizeVariation *products.SizeVariation Quantity uint cartitem:"Quantity" Price float32 DiscountRate uint transition.Transition }

// IsCart order item's state is cart func (item OrderItem) IsCart() bool { return item.State == DraftState || item.State == "" }

goodforever avatar Apr 09 '18 02:04 goodforever

The State field is embedded by the Transition.

cryptix avatar Apr 10 '18 12:04 cryptix