KonectarApp/lib/model/events_list_resp_2.dart

220 lines
5.9 KiB
Dart
Raw Permalink Normal View History

2024-11-19 12:57:30 +00:00
class EventsListResp2 {
int? code;
String? message;
List<EventsListingData>? data;
int? lastPage;
int? lastRow;
int? count;
EventsListResp2(
{this.code,
this.message,
this.data,
this.lastPage,
this.lastRow,
this.count});
EventsListResp2.fromJson(Map<String, dynamic> json) {
if (json["code"] is int) {
code = json["code"];
}
if (json["message"] is String) {
message = json["message"];
}
if (json["data"] is List) {
data = json["data"] == null
? null
: (json["data"] as List)
.map((e) => EventsListingData.fromJson(e))
.toList();
}
if (json["last_page"] is int) {
lastPage = json["last_page"];
}
if (json["last_row"] is int) {
lastRow = json["last_row"];
}
if (json["count"] is int) {
count = json["count"];
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> _data = <String, dynamic>{};
_data["code"] = code;
_data["message"] = message;
if (data != null) {
_data["data"] = data?.map((e) => e.toJson()).toList();
}
_data["last_page"] = lastPage;
_data["last_row"] = lastRow;
_data["count"] = count;
return _data;
}
}
class EventsListingData {
String? uniqueId;
String? sessionName;
String? startDate;
String? endDate;
String? organizer;
String? sessionSponsor;
dynamic location;
dynamic address;
dynamic postalCode;
dynamic url;
String? activityType;
String? role;
String? eventTypeName;
String? countryName;
String? stateName;
String? cityName;
String? organizerTypeName;
String? sponsorTypeName;
String? sessionTypeName;
String? kolName;
dynamic kolUniqueId;
String? eventName;
String? eventUniqueId;
String? createdByUser;
String? updatedByUser;
String? formattedCreatedAt;
String? formattedUpdatedAt;
EventsListingData(
{this.uniqueId,
this.sessionName,
this.startDate,
this.endDate,
this.organizer,
this.sessionSponsor,
this.location,
this.address,
this.postalCode,
this.url,
this.activityType,
this.role,
this.eventTypeName,
this.countryName,
this.stateName,
this.cityName,
this.organizerTypeName,
this.sponsorTypeName,
this.sessionTypeName,
this.kolName,
this.kolUniqueId,
this.eventName,
this.eventUniqueId,
this.createdByUser,
this.updatedByUser,
this.formattedCreatedAt,
this.formattedUpdatedAt});
EventsListingData.fromJson(Map<String, dynamic> json) {
if (json["unique_id"] is String) {
uniqueId = json["unique_id"];
}
if (json["session_name"] is String) {
sessionName = json["session_name"];
}
if (json["start_date"] is String) {
startDate = json["start_date"];
}
if (json["end_date"] is String) {
endDate = json["end_date"];
}
if (json["organizer"] is String) {
organizer = json["organizer"];
}
if (json["session_sponsor"] is String) {
sessionSponsor = json["session_sponsor"];
}
location = json["location"];
address = json["address"];
postalCode = json["postal_code"];
url = json["url"];
if (json["activity_type"] is String) {
activityType = json["activity_type"];
}
if (json["role"] is String) {
role = json["role"];
}
if (json["event_type_name"] is String) {
eventTypeName = json["event_type_name"];
}
if (json["country_name"] is String) {
countryName = json["country_name"];
}
if (json["state_name"] is String) {
stateName = json["state_name"];
}
if (json["city_name"] is String) {
cityName = json["city_name"];
}
if (json["organizer_type_name"] is String) {
organizerTypeName = json["organizer_type_name"];
}
if (json["sponsor_type_name"] is String) {
sponsorTypeName = json["sponsor_type_name"];
}
if (json["session_type_name"] is String) {
sessionTypeName = json["session_type_name"];
}
if (json["kol_name"] is String) {
kolName = json["kol_name"];
}
kolUniqueId = json["kol_unique_id"];
if (json["event_name"] is String) {
eventName = json["event_name"];
}
if (json["event_unique_id"] is String) {
eventUniqueId = json["event_unique_id"];
}
if (json["created_by_user"] is String) {
createdByUser = json["created_by_user"];
}
if (json["updated_by_user"] is String) {
updatedByUser = json["updated_by_user"];
}
if (json["formatted_created_at"] is String) {
formattedCreatedAt = json["formatted_created_at"];
}
if (json["formatted_updated_at"] is String) {
formattedUpdatedAt = json["formatted_updated_at"];
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> _data = <String, dynamic>{};
_data["unique_id"] = uniqueId;
_data["session_name"] = sessionName;
_data["start_date"] = startDate;
_data["end_date"] = endDate;
_data["organizer"] = organizer;
_data["session_sponsor"] = sessionSponsor;
_data["location"] = location;
_data["address"] = address;
_data["postal_code"] = postalCode;
_data["url"] = url;
_data["activity_type"] = activityType;
_data["role"] = role;
_data["event_type_name"] = eventTypeName;
_data["country_name"] = countryName;
_data["state_name"] = stateName;
_data["city_name"] = cityName;
_data["organizer_type_name"] = organizerTypeName;
_data["sponsor_type_name"] = sponsorTypeName;
_data["session_type_name"] = sessionTypeName;
_data["kol_name"] = kolName;
_data["kol_unique_id"] = kolUniqueId;
_data["event_name"] = eventName;
_data["event_unique_id"] = eventUniqueId;
_data["created_by_user"] = createdByUser;
_data["updated_by_user"] = updatedByUser;
_data["formatted_created_at"] = formattedCreatedAt;
_data["formatted_updated_at"] = formattedUpdatedAt;
return _data;
}
}