asset model asset attachment changed.

ui_ux_rollout_merge
Sikander Saleem 4 weeks ago
parent 0e1d8ab1bb
commit df2c7af281

@ -54,7 +54,7 @@ class AssetByIdModel {
String? comment; String? comment;
bool? isEnabled; bool? isEnabled;
String? tagCode; String? tagCode;
List<String>? assetAttachments; List<AssetAttachment>? assetAttachments;
String? retirementTypeName; String? retirementTypeName;
String? retirementStatusName; String? retirementStatusName;
String? retirementDate; String? retirementDate;
@ -189,9 +189,9 @@ class AssetByIdModel {
isEnabled = json['isEnabled']; isEnabled = json['isEnabled'];
tagCode = json['tagCode']; tagCode = json['tagCode'];
if (json['assetAttachments'] != null) { if (json['assetAttachments'] != null) {
assetAttachments = <String>[]; assetAttachments = <AssetAttachment>[];
json['assetAttachments'].forEach((v) { json['assetAttachments'].forEach((v) {
assetAttachments!.add(v); assetAttachments!.add(AssetAttachment.fromJson(v));
}); });
} }
retirementTypeName = json['retirementTypeName']; retirementTypeName = json['retirementTypeName'];
@ -323,6 +323,31 @@ class MultiAssets {
} }
} }
class AssetAttachment {
int? id;
String? attachmentName;
String? attachmentURL;
String? originalName;
AssetAttachment({this.id, this.attachmentName, this.attachmentURL, this.originalName});
AssetAttachment.fromJson(Map<String, dynamic> json) {
id = json['id'];
attachmentName = json['attachmentName'];
attachmentURL = json['attachmentURL'];
originalName = json['originalName'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['attachmentName'] = attachmentName;
data['attachmentURL'] = attachmentURL;
data['originalName'] = originalName;
return data;
}
}
class ModelDefinition { class ModelDefinition {
int? id; int? id;
String? assetName; String? assetName;

@ -49,7 +49,6 @@ class _DeviceSearchScreenState extends State<DeviceSearchScreen> {
_modelController.dispose(); _modelController.dispose();
_supplierController.dispose(); _supplierController.dispose();
_siteController.dispose(); _siteController.dispose();
_siteController.dispose();
_manufactureController.dispose(); _manufactureController.dispose();
_mdController.dispose(); _mdController.dispose();
super.dispose(); super.dispose();

Loading…
Cancel
Save