13ca0bcda9
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
28 lines
548 B
Swift
28 lines
548 B
Swift
import UIKit
|
|
|
|
struct WordBank: Codable {
|
|
let version: Int
|
|
let categories: [WordCategory]
|
|
}
|
|
|
|
struct WordCategory: Codable, Identifiable, Hashable {
|
|
let id: String
|
|
let name: String
|
|
let icon: String
|
|
let words: [Word]
|
|
}
|
|
|
|
struct Word: Codable, Identifiable, Hashable {
|
|
var id: String { word }
|
|
let word: String
|
|
let phonetic: String
|
|
let meaning: String
|
|
let example: String
|
|
let exampleMeaning: String
|
|
let colorHex: String?
|
|
|
|
var color: UIColor? {
|
|
colorHex.flatMap { UIColor(hex: $0) }
|
|
}
|
|
}
|