Add a flexible user attribute system that allows admins to define custom fields for users (text, textarea, number, email, url, date, select, multi_select types). - Add Ent schemas for UserAttributeDefinition and UserAttributeValue - Add service layer with validation logic - Add repository layer with batch operations support - Add admin API endpoints for CRUD and reorder operations - Add batch API for loading attribute values for multiple users - Add database migration (018_user_attributes.sql) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
45 lines
1.3 KiB
Go
45 lines
1.3 KiB
Go
package handler
|
|
|
|
import (
|
|
"github.com/Wei-Shaw/sub2api/internal/handler/admin"
|
|
)
|
|
|
|
// AdminHandlers contains all admin-related HTTP handlers
|
|
type AdminHandlers struct {
|
|
Dashboard *admin.DashboardHandler
|
|
User *admin.UserHandler
|
|
Group *admin.GroupHandler
|
|
Account *admin.AccountHandler
|
|
OAuth *admin.OAuthHandler
|
|
OpenAIOAuth *admin.OpenAIOAuthHandler
|
|
GeminiOAuth *admin.GeminiOAuthHandler
|
|
AntigravityOAuth *admin.AntigravityOAuthHandler
|
|
Proxy *admin.ProxyHandler
|
|
Redeem *admin.RedeemHandler
|
|
Setting *admin.SettingHandler
|
|
System *admin.SystemHandler
|
|
Subscription *admin.SubscriptionHandler
|
|
Usage *admin.UsageHandler
|
|
UserAttribute *admin.UserAttributeHandler
|
|
}
|
|
|
|
// Handlers contains all HTTP handlers
|
|
type Handlers struct {
|
|
Auth *AuthHandler
|
|
User *UserHandler
|
|
APIKey *APIKeyHandler
|
|
Usage *UsageHandler
|
|
Redeem *RedeemHandler
|
|
Subscription *SubscriptionHandler
|
|
Admin *AdminHandlers
|
|
Gateway *GatewayHandler
|
|
OpenAIGateway *OpenAIGatewayHandler
|
|
Setting *SettingHandler
|
|
}
|
|
|
|
// BuildInfo contains build-time information
|
|
type BuildInfo struct {
|
|
Version string
|
|
BuildType string // "source" for manual builds, "release" for CI builds
|
|
}
|