| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051 |
- package parking
- import (
- "wails-app/internal/api/v1/parking"
- "wails-app/internal/api/v1/uhf"
- "github.com/gin-gonic/gin"
- )
- func SetupParkingRouter(router *gin.RouterGroup) {
- parkLotGroup := router.Group("/lot")
- {
- parkLotGroup.POST("/create", parking.CreateParkingLot)
- parkLotGroup.PUT("/update", parking.UpdateParkingLot)
- parkLotGroup.GET("/get", parking.GetParkingLotByID)
- parkLotGroup.GET("/get-by-code", parking.GetParkingLotByCode)
- parkLotGroup.GET("/list", parking.ListParkingLots)
- parkLotGroup.GET("/all", parking.QueryAllParkingLots)
- parkLotGroup.DELETE("/delete", parking.DeleteParkingLot)
- }
- boothGroup := router.Group("/booth")
- {
- boothGroup.POST("/create", parking.CreateBooth)
- boothGroup.PUT("/update", parking.UpdateBooth)
- boothGroup.GET("/get", parking.GetBoothByID)
- boothGroup.GET("/get-by-code", parking.GetBoothByCode)
- boothGroup.GET("/list", parking.ListBooths)
- boothGroup.GET("/all", parking.QueryAllBooths)
- boothGroup.DELETE("/delete", parking.DeleteBooth)
- }
- channelGroup := router.Group("/channel")
- {
- channelGroup.POST("/create", parking.CreateChannel)
- channelGroup.PUT("/update", parking.UpdateChannel)
- channelGroup.GET("/get", parking.GetChannelByID)
- channelGroup.GET("/get-by-code", parking.GetChannelByCode)
- channelGroup.GET("/list", parking.ListChannels)
- channelGroup.GET("/all", parking.QueryAllChannels)
- channelGroup.DELETE("/delete", parking.DeleteChannel)
- }
- deviceGroup := router.Group("/device")
- {
- deviceGroup.POST("/create", uhf.CreateReader)
- deviceGroup.PUT("/update", uhf.UpdateReader)
- deviceGroup.GET("/connectedDevice", uhf.ConnectedDevice)
- deviceGroup.GET("/get-by-code", uhf.GetReaderByCode)
- deviceGroup.GET("/list", uhf.ListReaders)
- deviceGroup.GET("/all", uhf.QueryAllReaders)
- deviceGroup.DELETE("/delete", uhf.DeleteReader)
- }
- }
|