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"
	openapiHandler "github.com/break/junhong_cmp_fiber/internal/handler/openapi"
	"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
	ClientAuth                  *app.ClientAuthHandler
	ClientAsset                 *app.ClientAssetHandler
	ClientWallet                *app.ClientWalletHandler
	ClientOrder                 *app.ClientOrderHandler
	ClientExchange              *app.ClientExchangeHandler
	ClientRealname              *app.ClientRealnameHandler
	ClientDevice                *app.ClientDeviceHandler
	ClientRechargeOrder         *app.ClientRechargeOrderHandler
	ClientNotification          *app.ClientNotificationHandler
	Shop                        *admin.ShopHandler
	ShopRole                    *admin.ShopRoleHandler
	AdminAuth                   *admin.AuthHandler
	ShopCommission              *admin.ShopCommissionHandler
	CommissionWithdrawal        *admin.CommissionWithdrawalHandler
	CommissionWithdrawalSetting *admin.CommissionWithdrawalSettingHandler
	Enterprise                  *admin.EnterpriseHandler
	EnterpriseCard              *admin.EnterpriseCardHandler
	EnterpriseDevice            *admin.EnterpriseDeviceHandler
	Authorization               *admin.AuthorizationHandler
	IotCard                     *admin.IotCardHandler
	IotCardImport               *admin.IotCardImportHandler
	ExportTask                  *admin.ExportTaskHandler
	Notification                *admin.NotificationHandler
	Device                      *admin.DeviceHandler
	DeviceImport                *admin.DeviceImportHandler
	AssetAllocationRecord       *admin.AssetAllocationRecordHandler
	Storage                     *admin.StorageHandler
	Carrier                     *admin.CarrierHandler
	PackageSeries               *admin.PackageSeriesHandler
	Package                     *admin.PackageHandler
	PackageUsage                *admin.PackageUsageHandler
	ShopPackageBatchAllocation  *admin.ShopPackageBatchAllocationHandler
	ShopPackageBatchPricing     *admin.ShopPackageBatchPricingHandler
	ShopSeriesGrant             *admin.ShopSeriesGrantHandler
	AdminOrder                  *admin.OrderHandler
	AdminExchange               *admin.ExchangeHandler
	PaymentCallback             *callback.PaymentHandler
	CTCCRealnameCallback        *callback.CTCCRealnameHandler
	CMCCRealnameCallback        *callback.CMCCRealnameHandler
	CUCCRealnameCallback        *callback.CUCCRealnameHandler
	CUCCRealnameRemovalCallback *callback.CUCCRealnameRemovalHandler
	WeComApprovalCallback       *callback.WeComApprovalHandler
	PollingConfig               *admin.PollingConfigHandler
	PollingConcurrency          *admin.PollingConcurrencyHandler
	PollingMonitoring           *admin.PollingMonitoringHandler
	PollingAlert                *admin.PollingAlertHandler
	PollingCleanup              *admin.PollingCleanupHandler
	PollingManualTrigger        *admin.PollingManualTriggerHandler
	Asset                       *admin.AssetHandler
	AssetLifecycle              *admin.AssetLifecycleHandler
	AssetWallet                 *admin.AssetWalletHandler
	WechatConfig                *admin.WechatConfigHandler
	AgentRecharge               *admin.AgentRechargeHandler
	Refund                      *admin.RefundHandler
	OrderPackageInvalidate      *admin.OrderPackageInvalidateHandler
	AssetPackageBatchOrder      *admin.AssetPackageBatchOrderHandler
	ClientWechat                *app.ClientWechatHandler
	SuperAdmin                  *admin.SuperAdminHandler
	SystemConfig                *admin.SystemConfigHandler
	WeCom                       *admin.WeComHandler
	AgentOpenAPI                *openapiHandler.Handler
}

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