package app

import (
	"ln/nft/api/v1"
	"ln/nft/middleware"
	"github.com/gin-gonic/gin"
)

type ArtsRouter struct {
}

// InitArtsRouter 初始化 Arts 路由信息
func (s *ArtsRouter) InitArtsRouter(Router *gin.RouterGroup) {
	artsRouter := Router.Group("arts").Use(middleware.OperationRecord())
	artsRouterWithoutRecord := Router.Group("arts")
	var artsApi = v1.ApiGroupApp.AppApiGroup.ArtsApi
	{
		artsRouter.POST("createArts", artsApi.CreateArts)   // 新建Arts
		artsRouter.DELETE("deleteArts", artsApi.DeleteArts) // 删除Arts
		artsRouter.DELETE("deleteArtsByIds", artsApi.DeleteArtsByIds) // 批量删除Arts
		artsRouter.PUT("updateArts", artsApi.UpdateArts)    // 更新Arts
	}
	{
		artsRouterWithoutRecord.GET("findArts", artsApi.FindArts)        // 根据ID获取Arts
		artsRouterWithoutRecord.GET("getArtsList", artsApi.GetArtsList)  // 获取Arts列表
	}
}
