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("/twenty/one/pregnant/rate", analysis.TwentyOnePregnantRate) pastureRoute.POST("/pregnancy/report", analysis.PregnancyReport) pastureRoute.POST("/calving/report", analysis.CalvingReport) pastureRoute.POST("/disease/cure/report", analysis.DiseaseCureReport) pastureRoute.POST("/sale/cow/report", analysis.SaleCowReport) pastureRoute.POST("/single/factor/pregnant/report", analysis.SingleFactorInfantSurvivalRate) pastureRoute.POST("/multi/factor/pregnant/report", analysis.MultiFactorInfantSurvivalRate) } }