package course

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

type CourseBannersRouter struct {
}

// InitCourseBannersRouter 初始化 CourseBanners 路由信息
func (s *CourseBannersRouter) InitCourseBannersRouter(Router *gin.RouterGroup) {
	courseBannersRouter := Router.Group("courseBanners").Use(middleware.OperationRecord())
	courseBannersRouterWithoutRecord := Router.Group("courseBanners")
	var courseBannersApi = v1.ApiGroupApp.CourseApiGroup.CourseBannersApi
	{
		courseBannersRouter.POST("createCourseBanners", courseBannersApi.CreateCourseBanners)   // 新建CourseBanners
		courseBannersRouter.DELETE("deleteCourseBanners", courseBannersApi.DeleteCourseBanners) // 删除CourseBanners
		courseBannersRouter.DELETE("deleteCourseBannersByIds", courseBannersApi.DeleteCourseBannersByIds) // 批量删除CourseBanners
		courseBannersRouter.PUT("updateCourseBanners", courseBannersApi.UpdateCourseBanners)    // 更新CourseBanners
	}
	{
		courseBannersRouterWithoutRecord.GET("findCourseBanners", courseBannersApi.FindCourseBanners)        // 根据ID获取CourseBanners
		courseBannersRouterWithoutRecord.GET("getCourseBannersList", courseBannersApi.GetCourseBannersList)  // 获取CourseBanners列表
	}
}

// InitCourseBannersMetaMaskRouter 初始化 CourseBanners 路由信息
func (s *CourseBannersRouter) InitCourseBannersPubRouter(Router *gin.RouterGroup) {
	courseBannersRouterWithoutRecord := Router.Group("courseBanners")
	var courseBannersApi = v1.ApiGroupApp.CourseApiGroup.CourseBannersApi
	{
		courseBannersRouterWithoutRecord.GET("getBanners", courseBannersApi.GetCourseBannersListWeb)  // web端展示bannner 列表
	}
}
