package system

import (
	"github.com/gin-gonic/gin"
	v1 "miniapp/api/v1"
	"miniapp/middleware"
)

type PosterRouter struct {
}

// InitPosterRouter 注册医院路由
func (s *RouterGroup) InitPosterRouter(Router *gin.RouterGroup) {
	hospitalRouter := Router.Group("poster").Use(middleware.OperationRecord()).Use(middleware.JWTAuth())
	publicRouter := Router.Group("poster")
	posterApi := v1.ApiGroupApp.SystemApiGroup.PosterApi

	{
		hospitalRouter.POST("", posterApi.CreatePoster)    // 创建医院
		hospitalRouter.DELETE("", posterApi.DeletePoster)  // 删除医院
		hospitalRouter.PUT("", posterApi.UpdatePosterSort) // 更新医院

	}
	{
		publicRouter.GET("list", posterApi.GetPosterList) // 获取医院列表
		publicRouter.GET(":id", posterApi.GetPosterById)  // 获取单条医院消息
	}
}
