package goods

import (
	"github.com/gin-gonic/gin"
	"pychr/api/v1"
	"pychr/middleware"
)

type GoodsShowRouter struct {
}

// InitGoodsShowRouter 初始化 商品 路由信息
func (s *GoodsShowRouter) InitGoodsShowRouter(Router *gin.RouterGroup) {
	goodsShowRouter := Router.Group("goodsShow").Use(middleware.OperationRecord())
	goodsShowRouterWithoutRecord := Router.Group("goodsShow")
	var goodsShowApi = v1.ApiGroupApp.GoodsApiGroup.GoodsShowApi
	{
		goodsShowRouter.POST("createGoodsShow", goodsShowApi.CreateGoodsShow)             // 新建商品
		goodsShowRouter.DELETE("deleteGoodsShow", goodsShowApi.DeleteGoodsShow)           // 删除商品
		goodsShowRouter.DELETE("deleteGoodsShowByIds", goodsShowApi.DeleteGoodsShowByIds) // 批量删除商品
		goodsShowRouter.PUT("updateGoodsShow", goodsShowApi.UpdateGoodsShow)              // 更新商品
	}
	{
		goodsShowRouterWithoutRecord.GET("findGoodsShow", goodsShowApi.FindGoodsShow)       // 根据ID获取商品
		goodsShowRouterWithoutRecord.GET("getGoodsShowList", goodsShowApi.GetGoodsShowList) // 获取商品列表
	}
}
