package route

import (
	"kpt-pasture/http/handler/goods"

	"github.com/gin-gonic/gin"
)

func GoodsManageAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
	return func(s *gin.Engine) {
		for _, opt := range opts {
			opt(s)
		}
		// goods API 组  物品管理
		goodsRoute := authRouteGroup(s, "/api/v1/goods/")
		goodsRoute.POST("/drugs/list", goods.DrugsList)
		goodsRoute.POST("/drugs/createOrUpdate", goods.DrugsCreateOrUpdate)
		goodsRoute.POST("/medical/equipment/list", goods.MedicalEquipmentList)
		goodsRoute.POST("/medical/equipment/createOrUpdate", goods.MedicalEquipmentCreateOrUpdate)
	}
}