import { Definition , Vocabulary , VocabularyCategory , VocabularyWriting , } from '@ulangi/ulangi-common/interfaces' ; import { VocabularyRow } from '../interfaces/VocabularyRow' ; export class VocabularyRowConverter { public convertToVocabulary ( vocabularyRow , definitions , category , writing ) { const vocabulary = { vocabularyId : vocabularyRow . vocabularyId , vocabularyText : vocabularyRow . vocabularyText , vocabularyStatus : vocabularyRow . vocabularyStatus , definitions , category , writing , level : vocabularyRow . level , lastLearnedAt : vocabularyRow . lastLearnedAt , createdAt : vocabularyRow . createdAt , updatedAt : vocabularyRow . updatedAt , updatedStatusAt : vocabularyRow . updatedStatusAt , firstSyncedAt : vocabularyRow . firstSyncedAt , lastSyncedAt : vocabularyRow . lastSyncedAt , extraData : [ ] , } ; return vocabulary ; } }