1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253 |
- package route
- import (
- "kpt-pasture/http/handler/pasture"
- "github.com/gin-gonic/gin"
- )
- func PastureManageAPI(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/pasture/")
- pastureRoute.POST("/barn/list", pasture.SearchBarnList)
- pastureRoute.POST("/barn/createOrUpdate", pasture.CreatedOrUpdateBarn)
- pastureRoute.POST("/barn/type/list", pasture.SearchBarnTypeList)
- pastureRoute.POST("/barn/type/createOrUpdate", pasture.CreatedOrUpdateBarnType)
- pastureRoute.POST("/breed/status/list", pasture.SearchBreedStatusList)
- pastureRoute.POST("/breed/status/createOrUpdate", pasture.CreatedOrUpdateBreedStatus)
- pastureRoute.POST("/cow/kind/list", pasture.SearchCowKindList)
- pastureRoute.POST("/cow/kind/createOrUpdate", pasture.CreatedOrUpdateCowKind)
- pastureRoute.POST("/cow/status/list", pasture.SearchCowStatusList)
- pastureRoute.POST("/cow/status/createOrUpdate", pasture.CreatedOrUpdateCowStatus)
- pastureRoute.POST("/cow/type/list", pasture.SearchCowTypeList)
- pastureRoute.POST("/cow/type/createOrUpdate", pasture.CreatedOrUpdateCowType)
- pastureRoute.POST("/transfer/pen/reason/list", pasture.SearchTransferPenReasonList)
- pastureRoute.POST("/transfer/pen/reason/createOrUpdate", pasture.CreatedOrUpdateTransferPenReason)
- pastureRoute.POST("/cow/source/list", pasture.SearchCowSourceList)
- pastureRoute.POST("/cow/source/createOrUpdate", pasture.CreatedOrUpdateCowSource)
- // 疾病相关
- pastureRoute.POST("/disease/type/list", pasture.SearchDiseaseTypeList)
- pastureRoute.POST("/disease/type/createOrUpdate", pasture.CreatedOrUpdateDiseaseType)
- pastureRoute.POST("/disease/list", pasture.SearchDiseaseList)
- pastureRoute.POST("/disease/createOrUpdate", pasture.CreatedOrUpdateDisease)
- // 处方相关
- pastureRoute.POST("/prescription/list", pasture.SearchPrescriptionList)
- pastureRoute.POST("/prescription/createOrUpdate", pasture.CreatedOrUpdatePrescription)
- // 免疫计划相关
- pastureRoute.POST("/immunization/plan/list", pasture.SearchImmunizationList)
- pastureRoute.POST("/immunization/plan/createOrUpdate", pasture.CreatedOrUpdateImmunization)
- pastureRoute.PUT("/immunization/is_show/:id", pasture.ImmunizationIsShow)
- // 同期相关
- pastureRoute.POST("/same/time/createOrUpdate", pasture.SameTimeCreatedOrUpdate)
- pastureRoute.POST("/same/time/list", pasture.SameTimeList)
- pastureRoute.PUT("/same/time/is_show/:id", pasture.SameTimeIsShow)
- }
- }
|