/// One row from [spelling_items] joined with optional user progress. class SpellingItemRecord { const SpellingItemRecord({ required this.id, required this.spellingWordId, required this.canonicalWord, required this.displayedWord, required this.isCorrectlySpelled, required this.correctAnswer, this.familiarityScore = 0, this.attemptCount = 0, }); final String id; final String spellingWordId; final String canonicalWord; final String displayedWord; final bool isCorrectlySpelled; final num correctAnswer; final int familiarityScore; final int attemptCount; Map toQuestionMetadata() { return { 'spelling_item_id': id, 'spelling_word_id': spellingWordId, 'canonical_word': canonicalWord, 'displayed_word': displayedWord, 'is_correctly_spelled': isCorrectlySpelled, }; } Map toPipelineContext() { return { 'spellingItemId': id, 'spellingWordId': spellingWordId, 'canonicalWord': canonicalWord, 'displayedWord': displayedWord, 'isCorrectlySpelled': isCorrectlySpelled, }; } }