import Foundation // MARK: - AI分析関連モデル struct CollectionAnalysis: Codable { let totalCards: Int let uniqueCards: Int let rarityDistribution: [String: Int] let collectionScore: Double let recommendations: [String] enum CodingKeys: String, CodingKey { case totalCards = "total_cards" case uniqueCards = "unique_cards" case rarityDistribution = "rarity_distribution" case collectionScore = "collection_score" case recommendations } } struct GachaStats: Codable { let totalDraws: Int let cardsByRarity: [String: Int] let successRates: [String: Double] let recentActivity: [GachaActivity] enum CodingKeys: String, CodingKey { case totalDraws = "total_draws" case cardsByRarity = "cards_by_rarity" case successRates = "success_rates" case recentActivity = "recent_activity" } } struct GachaActivity: Codable { let timestamp: String let userDid: String let cardName: String let rarity: String enum CodingKeys: String, CodingKey { case timestamp case userDid = "user_did" case cardName = "card_name" case rarity } } struct UniqueRegistry: Codable { let registeredCards: [String: String] let totalUnique: Int enum CodingKeys: String, CodingKey { case registeredCards = "registered_cards" case totalUnique = "total_unique" } } struct SystemStatus: Codable { let status: String let mcpEnabled: Bool let mcpEndpoint: String? let databaseConnected: Bool let aiGptConnected: Bool enum CodingKeys: String, CodingKey { case status case mcpEnabled = "mcp_enabled" case mcpEndpoint = "mcp_endpoint" case databaseConnected = "database_connected" case aiGptConnected = "ai_gpt_connected" } }