product_rule.go 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. package v1
  2. import (
  3. "demo/internal/model/entity"
  4. "github.com/gogf/gf/v2/frame/g"
  5. )
  6. type CreateReq struct {
  7. g.Meta `path:"/product_rule" method:"post" tags:"product_rule" summary:"Create product_rule"`
  8. ActiviteId *int `v:"required" dc:"活动id"`
  9. ProductInfoId *int `v:"required" dc:"活动奖励对应的剑鱼产品id product_info的id"`
  10. PrizeId *int `v:"required" dc:"活动奖品信息表lottery_prize_info的id"`
  11. State *int `v:"required" dc:"是否可用;默认0:可用;1:不可用"`
  12. Cycle *int `v:"required" dc:"可兑换周期(单位天): 90"`
  13. }
  14. type CreateRes struct {
  15. }
  16. type UpdateReq struct {
  17. g.Meta `path:"/product_rule/{id}" method:"put" tags:"product_rule" summary:"Update product_rule"`
  18. Id *int `v:"required" dc:"赠送规则id"`
  19. ActiviteId *int ` dc:"活动id"`
  20. ProductInfoId *int ` dc:"活动奖励对应的剑鱼产品id product_info的id"`
  21. PrizeId *int ` dc:"活动奖品信息表lottery_prize_info的id"`
  22. State *int ` dc:"是否可用;默认0:可用;1:不可用"`
  23. Cycle *int ` dc:"可兑换周期(单位天): 90"`
  24. }
  25. type UpdateRes struct{}
  26. type GetListReq struct {
  27. g.Meta `path:"/product_rule" method:"get" tags:"product_rule" summary:"Get product_rule"`
  28. ActiviteId *int ` dc:"活动id"`
  29. Offset int `d:"0" dc:"分页开始条数"`
  30. Limit int `d:"10" dc:"每页条数"`
  31. }
  32. type GetListRes struct {
  33. List []*entity.ProductRule `json:"list" dc:"product_rule list"`
  34. Total int `json:"total" dc:"product_rule list total"`
  35. }
  36. type DelReq struct {
  37. g.Meta `path:"/product_rule/{id}" method:"delete" tags:"product_rule" summary:"Update product_rule"`
  38. Id *int64 ` v:"required" dc:"product_rule id"`
  39. }
  40. type DelRes struct {
  41. }