package router

import (
	"github.com/gin-gonic/gin"
	"go-admin/app/admin/apis/lotterymanage"
	"go-admin/app/admin/middleware"
	jwt "go-admin/pkg/jwtauth"
)

func registerLotteryRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	router := v1.Group("/lottery").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
	{
		router.POST("/config/public", lotterymanage.GetPublicLotteryConfigHandler)   // 公开查询抽奖配置
		router.POST("/config/update", lotterymanage.UpdateLotteryConfig)             // 设置积分抽奖参数
		router.POST("/prize/create", lotterymanage.CreateLotteryPrize)               // 新增奖品
		router.POST("/prize/update", lotterymanage.UpdateLotteryPrize)               // 编辑奖品
		router.POST("/prize/delete", lotterymanage.DeleteLotteryPrize)               // 删除奖品
		router.POST("/prize/list", lotterymanage.LotteryPrizeList)                   // 奖品列表
		router.POST("/record/list", lotterymanage.LotteryRecordList)                 // 查询抽奖记录列表
		router.POST("/prize_order/list", lotterymanage.LotteryPrizeOrderList)        // 查询抽奖订单列表
		router.POST("/prize_order/detail", lotterymanage.GetLotteryPrizeOrderDetail) // 查询抽奖订单详情
		router.POST("/prize_order/ship", lotterymanage.ShipLotteryPrizeOrder)        // 抽奖订单发货
		router.POST("/prize_order/pickup", lotterymanage.PickupLotteryPrizeOrder)    // 抽奖订单门店自提
	}
}
