package airDrop

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

type VoiceAddrRouter struct {
}

// InitVoiceAddrRouter 初始化 VoiceAddr 路由信息
func (s *VoiceAddrRouter) InitVoiceAddrRouter(Router *gin.RouterGroup) {
	voiceAddrRouter := Router.Group("voiceAddr").Use(middleware.OperationRecord())
	voiceAddrRouterWithoutRecord := Router.Group("voiceAddr")
	var voiceAddrApi = v1.ApiGroupApp.AirDropApiGroup.VoiceAddrApi
	{
		voiceAddrRouter.POST("createVoiceAddr", voiceAddrApi.CreateVoiceAddr)   // 新建VoiceAddr
		voiceAddrRouter.DELETE("deleteVoiceAddr", voiceAddrApi.DeleteVoiceAddr) // 删除VoiceAddr
		voiceAddrRouter.DELETE("deleteVoiceAddrByIds", voiceAddrApi.DeleteVoiceAddrByIds) // 批量删除VoiceAddr
		voiceAddrRouter.PUT("updateVoiceAddr", voiceAddrApi.UpdateVoiceAddr)    // 更新VoiceAddr
	}
	{
		voiceAddrRouterWithoutRecord.GET("findVoiceAddr", voiceAddrApi.FindVoiceAddr)        // 根据ID获取VoiceAddr
		voiceAddrRouterWithoutRecord.GET("getVoiceAddrList", voiceAddrApi.GetVoiceAddrList)  // 获取VoiceAddr列表
	}
}
