assignment.go 1.1 KB

123456789101112131415161718192021222324
  1. package autocode
  2. import (
  3. "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
  4. "github.com/flipped-aurora/gin-vue-admin/server/middleware"
  5. "github.com/gin-gonic/gin"
  6. )
  7. type AssignmentRouter struct {
  8. }
  9. // InitAssignmentRouter 初始化 Assignment 路由信息
  10. func (s *AssignmentRouter) InitAssignmentRouter(Router *gin.RouterGroup) {
  11. assignmentRouter := Router.Group("assignment").Use(middleware.OperationRecord())
  12. var assignmentApi = v1.ApiGroupApp.AutoCodeApiGroup.AssignmentApi
  13. {
  14. assignmentRouter.POST("createAssignment", assignmentApi.CreateAssignment) // 新建Assignment
  15. assignmentRouter.DELETE("deleteAssignment", assignmentApi.DeleteAssignment) // 删除Assignment
  16. assignmentRouter.DELETE("deleteAssignmentByIds", assignmentApi.DeleteAssignmentByIds) // 批量删除Assignment
  17. assignmentRouter.PUT("updateAssignment", assignmentApi.UpdateAssignment) // 更新Assignment
  18. assignmentRouter.GET("findAssignment", assignmentApi.FindAssignment) // 根据ID获取Assignment
  19. assignmentRouter.GET("getAssignmentList", assignmentApi.GetAssignmentList) // 获取Assignment列表
  20. }
  21. }