package course

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

type CourseActionRouter struct {
}

// InitCourseActionRouter 初始化 CourseAction 路由信息
func (s *CourseActionRouter) InitCourseActionRouter(Router *gin.RouterGroup) {
	courseActionRouter := Router.Group("courseAction").Use(middleware.OperationRecord())
	courseActionRouterWithoutRecord := Router.Group("courseAction")
	var courseActionApi = v1.ApiGroupApp.CourseApiGroup.CourseActionApi
	{
		courseActionRouter.POST("createCourseAction", courseActionApi.CreateCourseAction)   // 新建CourseAction
		courseActionRouter.DELETE("deleteCourseAction", courseActionApi.DeleteCourseAction) // 删除CourseAction
		courseActionRouter.DELETE("deleteCourseActionByIds", courseActionApi.DeleteCourseActionByIds) // 批量删除CourseAction
		courseActionRouter.PUT("updateCourseAction", courseActionApi.UpdateCourseAction)    // 更新CourseAction
	}
	{
		courseActionRouterWithoutRecord.GET("findCourseAction", courseActionApi.FindCourseAction)        // 根据ID获取CourseAction
		courseActionRouterWithoutRecord.GET("getCourseActionList", courseActionApi.GetCourseActionList)  // 获取CourseAction列表
	}
}


// InitCourseActionWebRouter 初始化 CourseAction 路由信息
func (s *CourseActionRouter) InitCourseActionWebRouter(Router *gin.RouterGroup) {
	courseActionRouterWithoutRecord := Router.Group("courseAction")
	var courseActionApi = v1.ApiGroupApp.CourseApiGroup.CourseActionApi
	{
		courseActionRouterWithoutRecord.GET("findAction", courseActionApi.FindCourseActionWeb)        // 根据ID获取CourseAction
		courseActionRouterWithoutRecord.GET("getActionList", courseActionApi.GetCourseActionListWeb)  // 获取CourseAction列表
	}
}