Documentation ¶
Index ¶
- type Coupon
- type Order
- func (o *Order) AddCoupon(couponID, rule string, discount int64) error
- func (o *Order) AddSaleItem(code, name string, price int64, count int32)
- func (o *Order) AfterCreate(ctx context.Context) error
- func (o *Order) AfterDelete(ctx context.Context) error
- func (o *Order) DeleteCoupon(id string) error
- func (o *Order) DeleteSaleItem(id string)
- func (o *Order) GetID() string
- func (o *Order) SetID(id string)
- func (o *Order) Update(opt UpdateOrderOpt)
- type RuleEngine
- type SaleItem
- type UpdateOrderOpt
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Coupon ¶
type Coupon struct { ddd.BaseEntity CouponID string // 券ID Rule string // 规则描述 Discount int64 // 折扣数 // contains filtered or unexported fields }
type Order ¶
type Order struct { ddd.BaseEntity ID string UserID string TotalAmount int64 Remark string Items []*SaleItem Coupons []*Coupon }
func (*Order) AddSaleItem ¶
func (*Order) DeleteCoupon ¶
func (*Order) DeleteSaleItem ¶
func (*Order) Update ¶
func (o *Order) Update(opt UpdateOrderOpt)
type RuleEngine ¶
type SaleItem ¶
type UpdateOrderOpt ¶
type UpdateOrderOpt struct {
Remark *string
}
Click to show internal directories.
Click to hide internal directories.