调整swag
This commit is contained in:
@@ -33,6 +33,7 @@ func NewPigFarmController(logger *logs.Logger, service service.PigFarmService) *
|
||||
// @Summary 创建猪舍
|
||||
// @Description 创建一个新的猪舍
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body dto.CreatePigHouseRequest true "猪舍信息"
|
||||
@@ -65,6 +66,7 @@ func (c *PigFarmController) CreatePigHouse(ctx *gin.Context) {
|
||||
// @Summary 获取单个猪舍
|
||||
// @Description 根据ID获取单个猪舍信息
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Produce json
|
||||
// @Param id path int true "猪舍ID"
|
||||
// @Success 200 {object} controller.Response{data=dto.PigHouseResponse} "获取成功"
|
||||
@@ -100,6 +102,7 @@ func (c *PigFarmController) GetPigHouse(ctx *gin.Context) {
|
||||
// @Summary 获取猪舍列表
|
||||
// @Description 获取所有猪舍的列表
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Produce json
|
||||
// @Success 200 {object} controller.Response{data=[]dto.PigHouseResponse} "获取成功"
|
||||
// @Router /api/v1/pig-houses [get]
|
||||
@@ -128,6 +131,7 @@ func (c *PigFarmController) ListPigHouses(ctx *gin.Context) {
|
||||
// @Summary 更新猪舍
|
||||
// @Description 更新一个已存在的猪舍信息
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int true "猪舍ID"
|
||||
@@ -171,6 +175,7 @@ func (c *PigFarmController) UpdatePigHouse(ctx *gin.Context) {
|
||||
// @Summary 删除猪舍
|
||||
// @Description 根据ID删除一个猪舍
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Produce json
|
||||
// @Param id path int true "猪舍ID"
|
||||
// @Success 200 {object} controller.Response "删除成功"
|
||||
@@ -207,6 +212,7 @@ func (c *PigFarmController) DeletePigHouse(ctx *gin.Context) {
|
||||
// @Summary 创建猪栏
|
||||
// @Description 创建一个新的猪栏
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param body body dto.CreatePenRequest true "猪栏信息"
|
||||
@@ -247,6 +253,7 @@ func (c *PigFarmController) CreatePen(ctx *gin.Context) {
|
||||
// @Summary 获取单个猪栏
|
||||
// @Description 根据ID获取单个猪栏信息
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Produce json
|
||||
// @Param id path int true "猪栏ID"
|
||||
// @Success 200 {object} controller.Response{data=dto.PenResponse} "获取成功"
|
||||
@@ -285,6 +292,7 @@ func (c *PigFarmController) GetPen(ctx *gin.Context) {
|
||||
// @Summary 获取猪栏列表
|
||||
// @Description 获取所有猪栏的列表
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Produce json
|
||||
// @Success 200 {object} controller.Response{data=[]dto.PenResponse} "获取成功"
|
||||
// @Router /api/v1/pens [get]
|
||||
@@ -316,6 +324,7 @@ func (c *PigFarmController) ListPens(ctx *gin.Context) {
|
||||
// @Summary 更新猪栏
|
||||
// @Description 更新一个已存在的猪栏信息
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int true "猪栏ID"
|
||||
@@ -363,6 +372,7 @@ func (c *PigFarmController) UpdatePen(ctx *gin.Context) {
|
||||
// @Summary 删除猪栏
|
||||
// @Description 根据ID删除一个猪栏
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Produce json
|
||||
// @Param id path int true "猪栏ID"
|
||||
// @Success 200 {object} controller.Response "删除成功"
|
||||
@@ -397,6 +407,7 @@ func (c *PigFarmController) DeletePen(ctx *gin.Context) {
|
||||
// @Summary 更新猪栏状态
|
||||
// @Description 更新指定猪栏的当前状态
|
||||
// @Tags 猪场管理
|
||||
// @Security BearerAuth
|
||||
// @Accept json
|
||||
// @Produce json
|
||||
// @Param id path int true "猪栏ID"
|
||||
|
||||
Reference in New Issue
Block a user