import 'package:jadb/_data_ingestion/sql_writable.dart'; class CodePoint extends SQLWritable { final String kanji; final String type; final String codepoint; const CodePoint({ required this.kanji, required this.type, required this.codepoint, }); @override Map get sqlValue => { 'kanji': kanji, 'type': type, 'codepoint': codepoint, }; } class Radical extends SQLWritable { final String kanji; final int radicalId; const Radical({required this.kanji, required this.radicalId}); @override Map get sqlValue => {'kanji': kanji, 'radicalId': radicalId}; } class StrokeMiscount extends SQLWritable { final String kanji; final int strokeCount; const StrokeMiscount({required this.kanji, required this.strokeCount}); @override Map get sqlValue => { 'kanji': kanji, 'strokeCount': strokeCount, }; } class Variant extends SQLWritable { final String kanji; final String type; final String variant; const Variant({ required this.kanji, required this.type, required this.variant, }); @override Map get sqlValue => { 'kanji': kanji, 'type': type, 'variant': variant, }; } class DictionaryReference extends SQLWritable { final String kanji; final String type; final String ref; const DictionaryReference({ required this.kanji, required this.type, required this.ref, }); @override Map get sqlValue => { 'kanji': kanji, 'type': type, 'ref': ref, }; } class DictionaryReferenceMoro extends SQLWritable { final String kanji; final String ref; final int? volume; final int? page; const DictionaryReferenceMoro({ required this.kanji, required this.ref, required this.volume, required this.page, }); @override Map get sqlValue => { 'kanji': kanji, 'ref': ref, 'volume': volume, 'page': page, }; } class QueryCode extends SQLWritable { final String kanji; final String code; final String type; final String? skipMisclassification; const QueryCode({ required this.kanji, required this.code, required this.type, required this.skipMisclassification, }); @override Map get sqlValue => { 'kanji': kanji, 'code': code, 'type': type, 'skipMisclassification': skipMisclassification, }; } class Reading extends SQLWritable { final String kanji; final String type; final String reading; const Reading({ required this.kanji, required this.type, required this.reading, }); @override Map get sqlValue => { 'kanji': kanji, 'type': type, 'reading': reading, }; } class Kunyomi extends SQLWritable { final String kanji; final String yomi; final bool isJouyou; const Kunyomi({ required this.kanji, required this.yomi, required this.isJouyou, }); @override Map get sqlValue => { 'kanji': kanji, 'yomi': yomi, 'isJouyou': isJouyou, }; } class Onyomi extends SQLWritable { final String kanji; final String yomi; final bool isJouyou; final String? type; const Onyomi({ required this.kanji, required this.yomi, required this.isJouyou, required this.type, }); @override Map get sqlValue => { 'kanji': kanji, 'yomi': yomi, 'isJouyou': isJouyou, 'type': type, }; } class Meaning extends SQLWritable { final String kanji; final String language; final String meaning; const Meaning({ required this.kanji, required this.language, this.meaning = 'eng', }); @override Map get sqlValue => { 'kanji': kanji, 'language': language, 'meaning': meaning, }; } class Character extends SQLWritable { final String literal; final int strokeCount; final int? grade; final int? frequency; final int? jlpt; final List radicalName; final List codepoints; final Radical? radical; final List strokeMiscounts; final List variants; final List dictionaryReferences; final List dictionaryReferencesMoro; final List querycodes; final List readings; final List onyomi; final List kunyomi; final List meanings; final List nanori; const Character({ required this.literal, required this.strokeCount, this.grade, this.frequency, this.jlpt, this.radicalName = const [], this.codepoints = const [], required this.radical, this.strokeMiscounts = const [], this.variants = const [], this.dictionaryReferences = const [], this.dictionaryReferencesMoro = const [], this.querycodes = const [], this.readings = const [], this.onyomi = const [], this.kunyomi = const [], this.meanings = const [], this.nanori = const [], }); @override Map get sqlValue => { 'literal': literal, 'grade': grade, 'strokeCount': strokeCount, 'frequency': frequency, 'jlpt': jlpt, }; }