package autocode

import (
	"github.com/flipped-aurora/gin-vue-admin/server/api/v1"
	"github.com/flipped-aurora/gin-vue-admin/server/middleware"
	"github.com/gin-gonic/gin"
)

type OrganizationRouter struct {
}

// InitOrganizationRouter 初始化 Organization 路由信息
func (s *OrganizationRouter) InitOrganizationRouter(Router *gin.RouterGroup) {
	organizationRouter := Router.Group("organization").Use(middleware.OperationRecord())
	var organizationApi = v1.ApiGroupApp.AutoCodeApiGroup.OrganizationApi
	{
		organizationRouter.POST("createOrganization", organizationApi.CreateOrganization)             // 新建Organization
		organizationRouter.DELETE("deleteOrganization", organizationApi.DeleteOrganization)           // 删除Organization
		organizationRouter.DELETE("deleteOrganizationByIds", organizationApi.DeleteOrganizationByIds) // 批量删除Organization
		organizationRouter.PUT("updateOrganization", organizationApi.UpdateOrganization)              // 更新Organization
		organizationRouter.GET("findOrganizationP", organizationApi.FindOrganization)                 // 根据ID获取Organization
		organizationRouter.GET("getOrganizationList", organizationApi.GetOrganizationList)            // 获取Organization列表
	}
}

func (s *ContentRouter) InitOrganizationPRouter(Router *gin.RouterGroup) {
	organizationRouter := Router.Group("organization").Use(middleware.OperationRecord())
	var organizationApi = v1.ApiGroupApp.AutoCodeApiGroup.OrganizationApi
	{
		organizationRouter.GET("findOrganization", organizationApi.FindOrganization)         // 根据ID获取Organization
		organizationRouter.GET("findOrganizationTree", organizationApi.FindOrganizationTree) // 根据ID获取Organization
		//contentRouter.GET("findContent", contentApi.FindContent) // 根据ID获取Content
	}
}
