package router

import (
	"github.com/gin-gonic/gin"
	"go-admin/app/admin/apis/repair"
	"go-admin/app/admin/middleware"
	jwt "go-admin/pkg/jwtauth"
)

func registerRepairRouter(v1 *gin.RouterGroup, authMiddleware *jwt.GinJWTMiddleware) {
	r := v1.Group("/repair").Use(authMiddleware.MiddlewareFunc()).Use(middleware.AuthCheckRole())
	r.POST("create", repair.CreateRepair)             // 新增维修订单
	r.POST("edit", repair.EditRepair)                 // 编辑
	r.POST("delete", repair.DeleteRepair)             // 删除
	r.POST("list", repair.OrderList)                  // 查询列表
	r.POST("detail", repair.OrderDetail)              // 查询列表详情
	r.POST("audit", repair.AuditRepair)               // 审核
	r.POST("send", repair.SendRepair)                 // 送修
	r.POST("complete", repair.CompleteRepair)         // 完成
	r.POST("detail_report", repair.OrderDetailReport) // 维修明细
}
