package route import ( "kpt-pasture/http/handler/analysis" "github.com/gin-gonic/gin" ) func AnalysisAPI(opts ...func(engine *gin.Engine)) func(s *gin.Engine) { return func(s *gin.Engine) { for _, opt := range opts { opt(s) } // pasture API 组 牧场管理 pastureRoute := authRouteGroup(s, "/api/v1/analysis/") pastureRoute.POST("/growth/curve", analysis.GrowthCurve) pastureRoute.POST("/weight/range", analysis.WeightRange) pastureRoute.POST("/mating/timely", analysis.MatingTimeLy) pastureRoute.POST("/pen/weight", analysis.PenWeight) pastureRoute.POST("/abortion/rate", analysis.AbortionRate) pastureRoute.POST("/twentyone/pregnant/rate", analysis.TwentyonePregnantRate) pastureRoute.POST("/pregnancy/report", analysis.PregnancyReport) } }