package app

import (
	v1 "git.echol.cn/loser/st/server/api/v1"
	"git.echol.cn/loser/st/server/middleware"
	"github.com/gin-gonic/gin"
)

type CharacterRouter struct{}

// InitCharacterRouter 初始化角色卡路由
func (r *CharacterRouter) InitCharacterRouter(Router *gin.RouterGroup) {
	characterRouter := Router.Group("character").Use(middleware.AppJWTAuth())
	characterApi := v1.ApiGroupApp.AppApiGroup.CharacterApi

	{
		characterRouter.POST("", characterApi.CreateCharacter)          // 创建角色卡
		characterRouter.GET("", characterApi.GetCharacterList)          // 获取角色卡列表
		characterRouter.GET(":id", characterApi.GetCharacterByID)       // 获取角色卡详情
		characterRouter.PUT(":id", characterApi.UpdateCharacter)        // 更新角色卡
		characterRouter.DELETE(":id", characterApi.DeleteCharacter)     // 删除角色卡
		characterRouter.POST("upload", characterApi.UploadCharacter)    // 上传角色卡文件
		characterRouter.GET(":id/export", characterApi.ExportCharacter) // 导出角色卡
	}
}
