123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475 |
- package route
- import (
- "kpt-pasture/http/handler/event"
- "github.com/gin-gonic/gin"
- )
- func EventAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) {
- return func(s *gin.Engine) {
- for _, opt := range opts {
- opt(s)
- }
-
- eventRoute := authRouteGroup(s, "/api/v1/event/")
-
- eventRoute.POST("/enter/list", event.EnterEventList)
- eventRoute.POST("/enter/create", event.EnterEventCreate)
-
- eventRoute.POST("/group/transfer/list", event.GroupTransferEventList)
- eventRoute.POST("/group/transfer/create", event.GroupTransferEventCreate)
-
- eventRoute.POST("/body/score/list", event.BodyScoreEventList)
- eventRoute.POST("/body/score/create", event.BodyScoreEventCreate)
-
- eventRoute.POST("/weight/list", event.WeightList)
- eventRoute.POST("/weight/batch", event.WeightBatch)
-
- eventRoute.POST("/calving/list", event.CalvingEventList)
- eventRoute.POST("/calving/create", event.CalvingEventCreate)
-
- eventRoute.POST("/pregnant/check/list", event.PregnantCheckEventList)
- eventRoute.POST("/pregnant/check/batch", event.PregnantCheckEventCreateBatch)
-
- eventRoute.POST("/mating/list", event.MatingEventList)
- eventRoute.POST("/mating/batch", event.MatingBatch)
-
- eventRoute.POST("/estrus/list", event.EstrusEventList)
- eventRoute.POST("/estrus/mating/batch", event.EstrusBatchMating)
-
- eventRoute.POST("/same/time/list", event.SameTimeList)
- eventRoute.POST("/same/time/create", event.SameTimeCreate)
- eventRoute.POST("/same/time/batch", event.SameTimeBatch)
-
- eventRoute.POST("/abortion/list", event.AbortionList)
- eventRoute.POST("/abortion/batch", event.AbortionCreateBatch)
-
- eventRoute.POST("/weaning/batch", event.WeaningCreateBatch)
-
- eventRoute.POST("/disease/create", event.CowDiseaseCreate)
-
- eventRoute.POST("/disease/diagnose", event.CowDiseaseDiagnose)
-
- eventRoute.POST("/disease/treatment", event.CowDiseaseTreatment)
- eventRoute.GET("/disease/suggest/prescription/:id", event.DiseaseSuggestPrescription)
-
- eventRoute.POST("/disease/treatment/details", event.CowDiseaseTreatmentDetail)
-
- eventRoute.POST("/disease/curable/batch", event.CowDiseaseCurable)
-
- eventRoute.POST("/departure/batch", event.Departure)
-
- eventRoute.PUT("/cow/ear/number", event.CowEarNumber)
-
- eventRoute.POST("/sale/create", event.CowSale)
- eventRoute.POST("/sale/list", event.CowSaleList)
-
- eventRoute.POST("/immunization/batch", event.ImmunizationBatch)
- eventRoute.POST("/immunization/list", event.ImmunizationList)
-
- eventRoute.POST("/dry/milk/batch", event.DryMilkBatch)
- eventRoute.POST("/dry/milk/list", event.DryMilkList)
- }
- }
|