import 'dart:convert'; class PatientEducationJourneyInsert { String? tokenId; int? patientId; int? languageId; List? data; PatientEducationJourneyInsert({ this.tokenId, this.patientId, this.languageId, this.data, }); factory PatientEducationJourneyInsert.fromRawJson(String str) => PatientEducationJourneyInsert.fromJson(json.decode(str)); String toRawJson() => json.encode(toJson()); factory PatientEducationJourneyInsert.fromJson(Map json) => PatientEducationJourneyInsert( tokenId: json["TokenID"], patientId: json["PatientID"], languageId: json["LanguageID"], data: json["data"] == null ? [] : List.from(json["data"]!.map((x) => Data.fromJson(x))), ); Map toJson() => { "TokenID": tokenId, "PatientID": patientId, "LanguageID": languageId, "data": data == null ? [] : List.from(data!.map((x) => x.toJson())), }; } class Data { String? type; int? consultationId; int? contentClassId; int? topicId; int? contentId; int? percentage; int? flavorId; String? srcType; String? screenType; Data({ this.type, this.consultationId, this.contentClassId, this.topicId, this.contentId, this.percentage, this.flavorId, this.srcType, this.screenType, }); factory Data.fromRawJson(String str) => Data.fromJson(json.decode(str)); String toRawJson() => json.encode(toJson()); factory Data.fromJson(Map json) => Data( type: json["Type"], consultationId: json["ConsultationID"], contentClassId: json["ContentClassId"], topicId: json["TopicID"], contentId: json["ContentID"], percentage: json["Percentage"], flavorId: json["FlavorId"], srcType: json["SrcType"], screenType: json["ScreenType"], ); Map toJson() => { "Type": type, "ConsultationID": consultationId, "ContentClassId": contentClassId, "TopicID": topicId, "ContentID": contentId, "Percentage": percentage, "FlavorId": flavorId, "SrcType": srcType, "ScreenType": screenType, }; }