package routers

import (
	"gdsm/controllers"
	"github.com/astaxie/beego"
	"wb/ctrl"
)

func init() {
	beego.Router("/", &controllers.MainController{}, "*:Get")
	beego.Router("/login", &controllers.LoginController{})
	beego.Router("/logout", &ctrl.LogoutController{})
	//beego.Router("/default", &controllers.MainController{},"*:Default")

	beego.Router("/item/get/:hi:string", &ctrl.ItemDynamicController{}, "*:Get")
	beego.Router("/item/list/:hi:string", &ctrl.ItemDynamicController{}, "*:List")
	beego.Router("/item/add/:hi:string", &ctrl.ItemDynamicController{}, "*:Add")
	beego.Router("/item/adds/:hi:string", &ctrl.ItemDynamicController{}, "*:Adds")
	beego.Router("/item/addsub/:hi:string", &ctrl.ItemDynamicController{}, "*:AddWithSub")
	beego.Router("/item/update/:hi:string", &ctrl.ItemDynamicController{}, "*:Update")
	beego.Router("/item/updatesub/:hi:string", &ctrl.ItemDynamicController{}, "*:UpdateWithSub")
	beego.Router("/item/updateitem/addsub/:hi:string", &ctrl.ItemDynamicController{}, "*:UpdateWithAddSub")

	beego.Router("/item/delete/:hi:string", &ctrl.ItemDynamicController{}, "*:Delete")
	beego.Router("/item/upload/:hi:string", &ctrl.ItemDynamicController{}, "*:Upload")
	beego.Router("/item/autocomplete/:hi:string", &ctrl.ItemDynamicController{}, "*:Autocomplete")

	// 服务基础服务
	beego.Router("/sui/*", &ctrl.SvcController{}, "*:UiSvc")
	beego.Router("/sqs/*", &ctrl.SvcController{}, "*:Sqs")

	//基本资源页面
	beego.Router("/ui/add/:hi:string", &ctrl.ItemDynamicController{}, "*:UiAdd")
	beego.Router("/ui/list/:hi:string", &ctrl.ItemDynamicController{}, "*:UiList")
	beego.Router("/ui/update/:hi:string", &ctrl.ItemDynamicController{}, "*:UiUpdate")
	beego.Router("/ui/view/:hi:string", &ctrl.ItemDynamicController{}, "*:UiView")
	beego.Router("/ui/attachment/:hi:string", &ctrl.ItemDynamicController{}, "*:UiAttachment")

}
