package router

import (
	"fonchain-fiee/pkg/middleware"
	"fonchain-fiee/pkg/service"
	"fonchain-fiee/pkg/service/supplier"

	"github.com/gin-gonic/gin"
)

func SupplierRouter(r *gin.RouterGroup) {

	supplierRoute := r.Group("supplier/web")

	supplierRoute.Use(middleware.CheckWebLogin(service.AccountProvider))
	{
		supplierRoute.POST("info", supplier.GetSupplier)
		supplierRoute.POST("create", supplier.CreateSupplier)
		supplierRoute.POST("update", supplier.UpdateSupplier)
		supplierRoute.POST("list", supplier.GetSupplierList)
	}
	{
		supplierRoute.POST("dictionary/create", supplier.CreateOrganizeDictionary)
		supplierRoute.POST("dictionary/list", supplier.GetOrganizeDictionaryList)
	}
	{
		supplierRoute.POST("country-region/list", supplier.GetCountryRegionList)
	}
	{
		supplierRoute.POST("import/record", supplier.CreateImportRecord)
		supplierRoute.POST("import/info", supplier.GetImportRecordInfo)
		supplierRoute.POST("export/list", supplier.GetExportList)
	}

}
