KonectarApp/lib/model/sessionstopics_model.dart

116 lines
3.2 KiB
Dart

// To parse this JSON data, do
//
// final sessionTopicsResponse = sessionTopicsResponseFromJson(jsonString);
import 'dart:convert';
SessionTopicsResponse sessionTopicsResponseFromJson(String str) =>
SessionTopicsResponse.fromJson(json.decode(str));
String sessionTopicsResponseToJson(SessionTopicsResponse data) =>
json.encode(data.toJson());
List<SessionsTopicsData> showSessionNotesResponseFromJson(String str) =>
List<SessionsTopicsData>.from(
json.decode(str).map((x) => SessionsTopicsData.fromJson(x)));
String showSessionNotesResponseToJson(List<SessionsTopicsData> data) =>
json.encode(List<dynamic>.from(data.map((x) => x.toJson())));
List<SessionsTopicsData> SessionsTopicsDataFromJson(String str) {
final jsonData = json.decode(str);
return new List<SessionsTopicsData>.from(
jsonData.map((x) => SessionsTopicsData.fromJson(x)));
}
class SessionTopicsResponse {
List<SessionsTopicsData>? data;
SessionTopicsResponse({
this.data,
});
factory SessionTopicsResponse.fromJson(Map<String, dynamic> json) =>
SessionTopicsResponse(
data: json["data"] == null
? []
: List<SessionsTopicsData>.from(
json["data"]!.map((x) => SessionsTopicsData.fromJson(x))),
);
Map<String, dynamic> toJson() => {
"data": data == null
? []
: List<dynamic>.from(data!.map((x) => x.toJson())),
};
}
class SessionsTopicsData {
String? sessionName;
String? eventTopics;
String? kolEventsId;
String? eventAttendeesId;
String? myEventId;
String? note;
String? kolId;
String? id;
bool? canEditNotes;
bool? canAddNotes;
String? noteCount;
dynamic projKolId;
bool? canAddInsights;
bool? canEditInsights;
SessionsTopicsData({
this.sessionName,
this.eventTopics,
this.kolEventsId,
this.eventAttendeesId,
this.myEventId,
this.note,
this.kolId,
this.id,
this.canEditNotes,
this.canAddNotes,
this.noteCount,
this.projKolId,
this.canAddInsights,
this.canEditInsights,
});
factory SessionsTopicsData.fromJson(Map<String, dynamic> json) =>
SessionsTopicsData(
sessionName: json["session_name"],
eventTopics: json["event_topics"],
kolEventsId: json["kol_events_id"],
eventAttendeesId: json["event_attendees_id"],
myEventId: json["my_event_id"],
note: json["note"],
kolId: json["kol_id"],
id: json["id"],
canEditNotes: json["can_edit_notes"],
canAddNotes: json["can_add_notes"],
noteCount: json["note_count"],
projKolId: json["proj_kol_id"],
canAddInsights: json["can_add_insights"],
canEditInsights: json["can_edit_insights"],
);
Map<String, dynamic> toJson() => {
"session_name": sessionName,
"event_topics": eventTopics,
"kol_events_id": kolEventsId,
"event_attendees_id": eventAttendeesId,
"my_event_id": myEventId,
"note": note,
"kol_id": kolId,
"id": id,
"can_edit_notes": canEditNotes,
"can_add_notes": canAddNotes,
"note_count": noteCount,
"proj_kol_id": projKolId,
"can_add_insights": canAddInsights,
"can_edit_insights": canEditInsights,
};
}