You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

37 lines
1.0 KiB

6 months ago
6 months ago
6 months ago
  1. // ================================================================================
  2. // Code generated and maintained by GoFrame CLI tool. DO NOT EDIT.
  3. // You can delete these comments if you wish manually maintain this interface file.
  4. // ================================================================================
  5. package service
  6. import (
  7. "CouponBackendGo/api/v1/coupon"
  8. "CouponBackendGo/internal/model/dto"
  9. "context"
  10. )
  11. type (
  12. ICoupon interface {
  13. GetCouponList(ctx context.Context, pageNo int, pageSize int) (couponList []*dto.DtoCoupon, err error)
  14. GetCouponListTotal(ctx context.Context) (total int, err error)
  15. GetCoupon(ctx context.Context, id int) (coupon *dto.DtoCoupon, err error)
  16. DeleteCoupon(ctx context.Context, id int) (err error)
  17. InsertCoupon(ctx context.Context, req *coupon.InsertCouponReq) (err error)
  18. }
  19. )
  20. var (
  21. localCoupon ICoupon
  22. )
  23. func Coupon() ICoupon {
  24. if localCoupon == nil {
  25. panic("implement not found for interface ICoupon, forgot register?")
  26. }
  27. return localCoupon
  28. }
  29. func RegisterCoupon(i ICoupon) {
  30. localCoupon = i
  31. }