package vehicle

import (
	"github.com/gin-gonic/gin"
	v1 "wails-app/internal/api/v1"
	"wails-app/internal/middleware"
)

type ShortlistRouter struct{}

func (s *ShortlistRouter) InitShortlistRouter(Router *gin.RouterGroup) {
	shortlistRouter := Router.Group("shortlist").Use(middleware.OperationRecord())
	shortlistRouterWithoutRecord := Router.Group("shortlist")

	shortlistRouterShortlist := v1.ApiGroupApp.VehicleApiGroup.ShortlistApi
	{
		shortlistRouter.POST("createShortlist", shortlistRouterShortlist.CreateShortlist)   // 创建shortlist
		shortlistRouter.DELETE("deleteShortlist", shortlistRouterShortlist.DeleteShortlist) // 删除shortlist
		shortlistRouter.PUT("updateShortlist", shortlistRouterShortlist.UpdateShortlist)    // 更新shortlist
	}
	{
		shortlistRouterWithoutRecord.GET("queryAllShortlists", shortlistRouterShortlist.QueryAllShortlists)  // 获取所有shortlist
		shortlistRouterWithoutRecord.POST("queryShortlistList", shortlistRouterShortlist.QueryShortlistList) // 获取shortlist列表
	}
}
