package airDrop

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

type RedPackageRouter struct {
}

// InitRedPackageRouter 初始化 RedPackage 路由信息
func (s *RedPackageRouter) InitRedPackageRouter(Router *gin.RouterGroup) {
	红包Router := Router.Group("红包").Use(middleware.OperationRecord())
	红包RouterWithoutRecord := Router.Group("红包")
	var 红包Api = v1.ApiGroupApp.AirDropApiGroup.RedPackageApi
	{
		红包Router.POST("createRedPackage", 红包Api.CreateRedPackage)   // 新建RedPackage
		红包Router.DELETE("deleteRedPackage", 红包Api.DeleteRedPackage) // 删除RedPackage
		红包Router.DELETE("deleteRedPackageByIds", 红包Api.DeleteRedPackageByIds) // 批量删除RedPackage
		红包Router.PUT("updateRedPackage", 红包Api.UpdateRedPackage)    // 更新RedPackage
	}
	{
		红包RouterWithoutRecord.GET("findRedPackage", 红包Api.FindRedPackage)        // 根据ID获取RedPackage
		红包RouterWithoutRecord.GET("getRedPackageList", 红包Api.GetRedPackageList)  // 获取RedPackage列表
	}
}
