package vehicle

import (
	"wails-app/internal/api/v1/vehicle"

	"github.com/gin-gonic/gin"
)

// SetupVehicleRouter 车辆相关路由
func SetupVehicleRouter(router *gin.RouterGroup) {
	vehicleGroup := router.Group("/vehicle")
	{
		// 车辆类型管理
		vehicleGroup.POST("/type/create", vehicle.CreateVehicleType)
		vehicleGroup.PUT("/type/update", vehicle.UpdateVehicleType)
		vehicleGroup.GET("/type/get", vehicle.GetVehicleTypeByID)
		vehicleGroup.POST("/type/list", vehicle.ListVehicleTypes)
		vehicleGroup.DELETE("/type/delete", vehicle.DeleteVehicleType)
		vehicleGroup.GET("/type/all", vehicle.GetAllVehicleTypes)

		// 车辆管理
		vehicleGroup.GET("/in-park", vehicle.GetInParkVehicles)
		vehicleGroup.POST("/create", vehicle.CreateVehicle)
		vehicleGroup.PUT("/update", vehicle.UpdateVehicle)
		vehicleGroup.GET("/get", vehicle.GetVehicleByID)
		vehicleGroup.GET("/get-by-plate", vehicle.GetVehicleByPlateNumber)
		vehicleGroup.GET("/all", vehicle.QueryAllVehicles)
		vehicleGroup.GET("/list", vehicle.ListVehicles)
		vehicleGroup.DELETE("/delete", vehicle.DeleteVehicle)

		// 车辆出入
		vehicleGroup.POST("/entry", vehicle.VehicleEntry)
		vehicleGroup.POST("/exit", vehicle.VehicleExit)

		// 收费配置
		vehicleGroup.POST("/fee-config/create", vehicle.CreateFeeConfig)
		vehicleGroup.PUT("/fee-config/update", vehicle.UpdateFeeConfig)
		vehicleGroup.GET("/fee-config/get", vehicle.GetFeeConfigByID)
		vehicleGroup.GET("/fee-config/list", vehicle.ListFeeConfigs)
		vehicleGroup.DELETE("/fee-config/delete", vehicle.DeleteFeeConfig)

		// 车辆记录
		vehicleGroup.GET("/record/get", vehicle.GetVehicleRecordByID)
		vehicleGroup.GET("/record/list-by-plate", vehicle.ListVehicleRecordsByPlateNumber)
		vehicleGroup.POST("/record/list", vehicle.ListVehicleRecords)
	}
}
