96 lines
2.3 KiB
Dart
96 lines
2.3 KiB
Dart
class PodcastsModel {
|
|
bool? success;
|
|
String? message;
|
|
Result? result;
|
|
|
|
PodcastsModel({this.success, this.message, this.result});
|
|
|
|
PodcastsModel.fromJson(Map<String, dynamic> json) {
|
|
success = json['success'];
|
|
message = json['message'];
|
|
result = json['result'] != null ? Result.fromJson(json['result']) : null;
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['success'] = success;
|
|
data['message'] = message;
|
|
if (result != null) {
|
|
data['result'] = result!.toJson();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class Result {
|
|
List<LatestPodcast>? latestPodcast;
|
|
|
|
Result({this.latestPodcast});
|
|
|
|
Result.fromJson(Map<String, dynamic> json) {
|
|
if (json['latestPodcast'] != null) {
|
|
latestPodcast = <LatestPodcast>[];
|
|
json['latestPodcast'].forEach((v) {
|
|
latestPodcast!.add(LatestPodcast.fromJson(v));
|
|
});
|
|
}
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
if (latestPodcast != null) {
|
|
data['latestPodcast'] = latestPodcast!.map((v) => v.toJson()).toList();
|
|
}
|
|
return data;
|
|
}
|
|
}
|
|
|
|
class LatestPodcast {
|
|
int? id;
|
|
String? title;
|
|
String? description;
|
|
String? podcastUrl;
|
|
String? bannerImage;
|
|
String? isActive;
|
|
String? deletedAt;
|
|
String? createdAt;
|
|
String? updatedAt;
|
|
|
|
LatestPodcast(
|
|
{this.id,
|
|
this.title,
|
|
this.description,
|
|
this.podcastUrl,
|
|
this.bannerImage,
|
|
this.isActive,
|
|
this.deletedAt,
|
|
this.createdAt,
|
|
this.updatedAt});
|
|
|
|
LatestPodcast.fromJson(Map<String, dynamic> json) {
|
|
id = json['id'];
|
|
title = json['title'];
|
|
description = json['description'];
|
|
podcastUrl = json['podcast_url'];
|
|
bannerImage = json['banner_image'];
|
|
isActive = json['is_active'];
|
|
deletedAt = json['deleted_at'];
|
|
createdAt = json['created_at'];
|
|
updatedAt = json['updated_at'];
|
|
}
|
|
|
|
Map<String, dynamic> toJson() {
|
|
final Map<String, dynamic> data = <String, dynamic>{};
|
|
data['id'] = id;
|
|
data['title'] = title;
|
|
data['description'] = description;
|
|
data['podcast_url'] = podcastUrl;
|
|
data['banner_image'] = bannerImage;
|
|
data['is_active'] = isActive;
|
|
data['deleted_at'] = deletedAt;
|
|
data['created_at'] = createdAt;
|
|
data['updated_at'] = updatedAt;
|
|
return data;
|
|
}
|
|
}
|