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.
hmg-mohemm-flutter-app/lib/models/itg/advertisement.dart

100 lines
3.4 KiB
Dart

class Advertisement {
Advertisement({
this.advertisementId,
this.advertisementTitle,
this.durationInSeconds,
this.showDelete,
this.acknowledgment,
this.viewAttachFileColl,
this.isActive,
this.pageSize,
this.pageNo,
this.languageId,
});
final int? advertisementId;
final String? advertisementTitle;
final int? durationInSeconds;
final bool? showDelete;
final dynamic acknowledgment;
final List<ViewAttachFileColl>? viewAttachFileColl;
final bool? isActive;
final dynamic pageSize;
final dynamic pageNo;
final dynamic languageId;
factory Advertisement.fromJson(Map<String, dynamic> json) => Advertisement(
advertisementId: json["advertisementId"] == null ? null : json["advertisementId"],
advertisementTitle: json["advertisementTitle"] == null ? null : json["advertisementTitle"],
durationInSeconds: json["durationInSeconds"] == null ? null : json["durationInSeconds"],
showDelete: json["showDelete"] == null ? null : json["showDelete"],
acknowledgment: json["acknowledgment"],
viewAttachFileColl: json["viewAttachFileColl"] == null ? null : List<ViewAttachFileColl>.from(json["viewAttachFileColl"].map((x) => ViewAttachFileColl.fromJson(x))),
isActive: json["isActive"] == null ? null : json["isActive"],
pageSize: json["pageSize"],
pageNo: json["pageNo"],
languageId: json["languageId"],
);
Map<String, dynamic> toJson() => {
"advertisementId": advertisementId == null ? null : advertisementId,
"advertisementTitle": advertisementTitle == null ? null : advertisementTitle,
"durationInSeconds": durationInSeconds == null ? null : durationInSeconds,
"showDelete": showDelete == null ? null : showDelete,
"acknowledgment": acknowledgment,
"viewAttachFileColl": viewAttachFileColl == null ? null : List<dynamic>.from(viewAttachFileColl!.map((x) => x.toJson())),
"isActive": isActive == null ? null : isActive,
"pageSize": pageSize,
"pageNo": pageNo,
"languageId": languageId,
};
}
class ViewAttachFileColl {
ViewAttachFileColl({
this.attachmentId,
this.fileName,
this.contentType,
this.attachFileStream,
this.base64String,
this.isActive,
this.referenceItemId,
this.content,
this.filePath,
});
final dynamic attachmentId;
final String? fileName;
final String? contentType;
final dynamic attachFileStream;
final String? base64String;
final dynamic isActive;
final dynamic referenceItemId;
final dynamic content;
final dynamic filePath;
factory ViewAttachFileColl.fromJson(Map<String, dynamic> json) => ViewAttachFileColl(
attachmentId: json["attachmentId"],
fileName: json["fileName"] == null ? null : json["fileName"],
contentType: json["contentType"] == null ? null : json["contentType"],
attachFileStream: json["attachFileStream"],
base64String: json["base64String"] == null ? null : json["base64String"],
isActive: json["isActive"],
referenceItemId: json["referenceItemId"],
content: json["content"],
filePath: json["filePath"],
);
Map<String, dynamic> toJson() => {
"attachmentId": attachmentId,
"fileName": fileName == null ? null : fileName,
"contentType": contentType == null ? null : contentType,
"attachFileStream": attachFileStream,
"base64String": base64String == null ? null : base64String,
"isActive": isActive,
"referenceItemId": referenceItemId,
"content": content,
"filePath": filePath,
};
}