package bootstrap

import (
	"github.com/break/junhong_cmp_fiber/internal/handler/admin"
	"github.com/break/junhong_cmp_fiber/internal/handler/app"
	authHandler "github.com/break/junhong_cmp_fiber/internal/handler/auth"
	"github.com/break/junhong_cmp_fiber/internal/handler/callback"
	"github.com/break/junhong_cmp_fiber/internal/handler/h5"
	"github.com/break/junhong_cmp_fiber/internal/middleware"
	"github.com/gofiber/fiber/v2"
)

type Handlers struct {
	Auth                        *authHandler.Handler
	Account                     *admin.AccountHandler
	Role                        *admin.RoleHandler
	Permission                  *admin.PermissionHandler
	PersonalCustomer            *app.PersonalCustomerHandler
	Shop                        *admin.ShopHandler
	AdminAuth                   *admin.AuthHandler
	H5Auth                      *h5.AuthHandler
	ShopCommission              *admin.ShopCommissionHandler
	CommissionWithdrawal        *admin.CommissionWithdrawalHandler
	CommissionWithdrawalSetting *admin.CommissionWithdrawalSettingHandler
	Enterprise                  *admin.EnterpriseHandler
	EnterpriseCard              *admin.EnterpriseCardHandler
	EnterpriseDevice            *admin.EnterpriseDeviceHandler
	EnterpriseDeviceH5          *h5.EnterpriseDeviceHandler
	Authorization               *admin.AuthorizationHandler
	MyCommission                *admin.MyCommissionHandler
	IotCard                     *admin.IotCardHandler
	IotCardImport               *admin.IotCardImportHandler
	Device                      *admin.DeviceHandler
	DeviceImport                *admin.DeviceImportHandler
	AssetAllocationRecord       *admin.AssetAllocationRecordHandler
	Storage                     *admin.StorageHandler
	Carrier                     *admin.CarrierHandler
	PackageSeries               *admin.PackageSeriesHandler
	Package                     *admin.PackageHandler
	ShopSeriesAllocation        *admin.ShopSeriesAllocationHandler
	ShopPackageAllocation       *admin.ShopPackageAllocationHandler
	ShopPackageBatchAllocation  *admin.ShopPackageBatchAllocationHandler
	ShopPackageBatchPricing     *admin.ShopPackageBatchPricingHandler
	AdminOrder                  *admin.OrderHandler
	H5Order                     *h5.OrderHandler
	H5Recharge                  *h5.RechargeHandler
	PaymentCallback             *callback.PaymentHandler
}

// Middlewares 封装所有中间件
// 用于路由注册
type Middlewares struct {
	PersonalAuth *middleware.PersonalAuthMiddleware
	AdminAuth    func(*fiber.Ctx) error
	H5Auth       func(*fiber.Ctx) error
	// TODO: 新增 Middleware 在此添加字段
}
