You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mohemm-flutter-app/lib/models/content_info_model.dart

66 lines
2.0 KiB
Dart

class ContentInfoModel {
int? totalItemsCount;
int? statusCode;
String? message;
List<ContentInfoDataModel>? data;
ContentInfoModel({this.totalItemsCount, this.statusCode, this.message, this.data});
ContentInfoModel.fromJson(Map<String, dynamic> json) {
totalItemsCount = json['totalItemsCount'];
statusCode = json['statusCode'];
message = json['message'];
if (json['data'] != null) {
data = [];
json['data'].forEach((v) {
data?.add(new ContentInfoDataModel.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['totalItemsCount'] = this.totalItemsCount;
data['statusCode'] = this.statusCode;
data['message'] = this.message;
if (this.data != null) {
data['data'] = this.data?.map((v) => v.toJson()).toList();
}
return data;
}
}
class ContentInfoDataModel {
int? contentInfoId;
int? contentTypeId;
String? content;
String? contentTypeNameEn;
String? contentTypeNameAr;
String? fileName;
String? exposeFilePath;
ContentInfoDataModel({this.contentInfoId, this.contentTypeId, this.content, this.contentTypeNameEn, this.contentTypeNameAr, this.fileName, this.exposeFilePath});
ContentInfoDataModel.fromJson(Map<String, dynamic> json) {
contentInfoId = json['contentInfoId'];
contentTypeId = json['contentTypeId'];
content = json['content'];
contentTypeNameEn = json['contentTypeNameEn'];
contentTypeNameAr = json['contentTypeNameAr'];
fileName = json['fileName'];
exposeFilePath = json['exposeFilePath'];
}
Map<String, dynamic> toJson() {
Map<String, dynamic> data = new Map<String, dynamic>();
data['contentInfoId'] = this.contentInfoId;
data['contentTypeId'] = this.contentTypeId;
data['content'] = this.content;
data['contentTypeNameEn'] = this.contentTypeNameEn;
data['contentTypeNameAr'] = this.contentTypeNameAr;
data['fileName'] = this.fileName;
data['exposeFilePath'] = this.exposeFilePath;
return data;
}
}