package brc

import (
	v1 "ffie-admin/server/api/v1"
	"ffie-admin/server/middleware"

	"github.com/gin-gonic/gin"
)

type BrcListRouter struct {
}

// InitBrcListRouter 初始化 BrcList 路由信息
func (s *BrcListRouter) InitBrcListRouter(Router *gin.RouterGroup) {
	brcListRouter := Router.Group("brcList").Use(middleware.OperationRecord())
	brcListRouterWithoutRecord := Router.Group("brcList")
	var brcListApi = v1.ApiGroupApp.BrcApiGroup.BrcListApi
	{
		brcListRouter.POST("createBrcList", brcListApi.CreateBrcList)             // 新建BrcList
		brcListRouter.DELETE("deleteBrcList", brcListApi.DeleteBrcList)           // 删除BrcList
		brcListRouter.DELETE("deleteBrcListByIds", brcListApi.DeleteBrcListByIds) // 批量删除BrcList
		brcListRouter.PUT("updateBrcList", brcListApi.UpdateBrcList)              // 更新BrcList
	}
	{
		brcListRouterWithoutRecord.GET("findBrcList", brcListApi.FindBrcList)       // 根据ID获取BrcList
		brcListRouterWithoutRecord.GET("getBrcListList", brcListApi.GetBrcListList) // 获取BrcList列表
	}
}

// InitBrcListRouter 初始化 BrcList 路由信息
func (s *BrcListRouter) InitBrcListPubRouter(Router *gin.RouterGroup) {
	brcListRouterWithoutRecord := Router.Group("brcList")
	var brcListApi = v1.ApiGroupApp.BrcApiGroup.BrcListApi
	{
		brcListRouterWithoutRecord.GET("findBrcListByToken", brcListApi.FindBrcByToken) // 根据ID获取BrcList
	}
}
