package airDrop

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

type RedPackageTxRouter struct {
}

// InitRedPackageTxRouter 初始化 RedPackageTx 路由信息
func (s *RedPackageTxRouter) InitRedPackageTxRouter(Router *gin.RouterGroup) {
	txRouter := Router.Group("tx").Use(middleware.OperationRecord())
	txRouterWithoutRecord := Router.Group("tx")
	var txApi = v1.ApiGroupApp.AirDropApiGroup.RedPackageTxApi
	{
		txRouter.POST("createRedPackageTx", txApi.CreateRedPackageTx)   // 新建RedPackageTx
		txRouter.DELETE("deleteRedPackageTx", txApi.DeleteRedPackageTx) // 删除RedPackageTx
		txRouter.DELETE("deleteRedPackageTxByIds", txApi.DeleteRedPackageTxByIds) // 批量删除RedPackageTx
		txRouter.PUT("updateRedPackageTx", txApi.UpdateRedPackageTx)    // 更新RedPackageTx
	}
	{
		txRouterWithoutRecord.GET("findRedPackageTx", txApi.FindRedPackageTx)        // 根据ID获取RedPackageTx
		txRouterWithoutRecord.GET("getRedPackageTxList", txApi.GetRedPackageTxList)  // 获取RedPackageTx列表
	}
}
