97 lines
3.1 KiB
Dart
97 lines
3.1 KiB
Dart
|
// To parse this JSON data, do
|
||
|
//
|
||
|
// final allSessionNotesResponse = allSessionNotesResponseFromJson(jsonString);
|
||
|
|
||
|
import 'dart:convert';
|
||
|
|
||
|
String allSessionNotesResponseToJson(List<AllSessionNotesResponse> data) =>
|
||
|
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
|
||
|
|
||
|
List<AllSessionNotesResponse> AllSessionNotesResponseFromJson(String str) {
|
||
|
final jsonData = json.decode(str);
|
||
|
return new List<AllSessionNotesResponse>.from(
|
||
|
jsonData.map((x) => AllSessionNotesResponse.fromJson(x)));
|
||
|
}
|
||
|
|
||
|
class AllSessionNotesResponse {
|
||
|
List<List<dynamic>>? eventTopicNotesId;
|
||
|
String? note;
|
||
|
String? sessionName;
|
||
|
String? eventTopics;
|
||
|
String? userName;
|
||
|
String? users;
|
||
|
List<String>? notes;
|
||
|
List<String>? createdOn;
|
||
|
String? firstName;
|
||
|
String? middleName;
|
||
|
String? lastName;
|
||
|
DateTime? notesCreatedOn;
|
||
|
List<String>? addedBy;
|
||
|
|
||
|
AllSessionNotesResponse({
|
||
|
this.eventTopicNotesId,
|
||
|
this.note,
|
||
|
this.sessionName,
|
||
|
this.eventTopics,
|
||
|
this.userName,
|
||
|
this.users,
|
||
|
this.notes,
|
||
|
this.createdOn,
|
||
|
this.firstName,
|
||
|
this.middleName,
|
||
|
this.lastName,
|
||
|
this.notesCreatedOn,
|
||
|
this.addedBy,
|
||
|
});
|
||
|
|
||
|
factory AllSessionNotesResponse.fromJson(Map<String, dynamic> json) =>
|
||
|
AllSessionNotesResponse(
|
||
|
eventTopicNotesId: json["event_topic_notes_id"] == null
|
||
|
? []
|
||
|
: List<List<dynamic>>.from(json["event_topic_notes_id"]!
|
||
|
.map((x) => List<dynamic>.from(x.map((x) => x)))),
|
||
|
note: json["note"],
|
||
|
sessionName: json["session_name"],
|
||
|
eventTopics: json["event_topics"],
|
||
|
userName: json["user_name"]!,
|
||
|
users: json["users"],
|
||
|
notes: json["notes"] == null
|
||
|
? []
|
||
|
: List<String>.from(json["notes"]!.map((x) => x)),
|
||
|
createdOn: json["created_on"] == null
|
||
|
? []
|
||
|
: List<String>.from(json["created_on"]!.map((x) => x)),
|
||
|
firstName: json["first_name"],
|
||
|
middleName: json["middle_name"],
|
||
|
lastName: json["last_name"],
|
||
|
notesCreatedOn: json["notes_created_on"] == null
|
||
|
? null
|
||
|
: DateTime.parse(json["notes_created_on"]),
|
||
|
addedBy: json["added_by"] == null
|
||
|
? []
|
||
|
: List<String>.from(json["added_by"]!.map((x) => x)),
|
||
|
);
|
||
|
|
||
|
Map<String, dynamic> toJson() => {
|
||
|
"event_topic_notes_id": eventTopicNotesId == null
|
||
|
? []
|
||
|
: List<dynamic>.from(eventTopicNotesId!
|
||
|
.map((x) => List<dynamic>.from(x.map((x) => x)))),
|
||
|
"note": note,
|
||
|
"session_name": sessionName,
|
||
|
"event_topics": eventTopics,
|
||
|
"user_name": userName,
|
||
|
"users": users,
|
||
|
"notes": notes == null ? [] : List<dynamic>.from(notes!.map((x) => x)),
|
||
|
"created_on": createdOn == null
|
||
|
? []
|
||
|
: List<dynamic>.from(createdOn!.map((x) => x)),
|
||
|
"first_name": firstName,
|
||
|
"middle_name": middleName,
|
||
|
"last_name": lastName,
|
||
|
"notes_created_on": notesCreatedOn?.toIso8601String(),
|
||
|
"added_by":
|
||
|
addedBy == null ? [] : List<dynamic>.from(addedBy!.map((x) => x)),
|
||
|
};
|
||
|
}
|