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.
cloudsolutions-atoms/lib/models/new_models/dashboard_detail.dart

141 lines
3.4 KiB
Dart

class DashboardDetail {
List<Data> data;
int totalRows;
String message;
String title;
String innerMessage;
int responseCode;
bool isSuccess;
DashboardDetail(
{this.data,
this.totalRows,
this.message,
this.title,
this.innerMessage,
this.responseCode,
this.isSuccess});
DashboardDetail.fromJson(Map<String, dynamic> json) {
if (json['data'] != null) {
data = <Data>[];
json['data'].forEach((v) {
data.add(Data.fromJson(v));
});
}
totalRows = json['totalRows'];
message = json['message'];
title = json['title'];
innerMessage = json['innerMessage'];
responseCode = json['responseCode'];
isSuccess = json['isSuccess'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
if (this.data != null) {
data['data'] = this.data.map((v) => v.toJson()).toList();
}
data['totalRows'] = totalRows;
data['message'] = message;
data['title'] = title;
data['innerMessage'] = innerMessage;
data['responseCode'] = responseCode;
data['isSuccess'] = isSuccess;
return data;
}
}
class Data {
int id;
String typeTransaction;
String transactionDate;
String statusName;
String priorityName;
bool isHighPriority;
String assetName;
String assetNumber;
String requestTypeName;
String requestNo;
Data(
{this.id,
this.typeTransaction,
this.transactionDate,
this.statusName,
this.priorityName,
this.isHighPriority,
this.assetName,
this.assetNumber,
this.requestTypeName,
this.requestNo});
Data.fromJson(Map<String, dynamic> json) {
id = json['id'];
typeTransaction = json['typeTransaction'];
transactionDate = json['transactionDate'];
statusName = json['statusName'];
priorityName = json['priorityName'];
isHighPriority = json['isHighPriority'];
assetName = json['assetName'];
assetNumber = json['assetNumber'];
requestTypeName = json['requestTypeName'];
requestNo = json['requestNo'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['id'] = id;
data['typeTransaction'] = typeTransaction;
data['transactionDate'] = transactionDate;
data['statusName'] = statusName;
data['priorityName'] = priorityName;
data['isHighPriority'] = isHighPriority;
data['assetName'] = assetName;
data['assetNumber'] = assetNumber;
data['requestTypeName'] = requestTypeName;
data['requestNo'] = requestNo;
return data;
}
}
class CommonResponseModel{
bool data;
String message;
String title;
String innerMessage;
int responseCode;
bool isSuccess;
CommonResponseModel({
this.data,
this.message,
this.title,
this.innerMessage,
this.responseCode,
this.isSuccess,
});
factory CommonResponseModel.fromJson(Map<String, dynamic> json) {
return CommonResponseModel(
data: json['data'],
message: json['message'] ?? '',
title: json['title'],
innerMessage: json['innerMessage'],
responseCode: json['responseCode'],
isSuccess: json['isSuccess'],
);
}
Map<String, dynamic> toJson() {
return {
'data': data,
'message': message,
'title': title,
'innerMessage': innerMessage,
'responseCode': responseCode,
'isSuccess': isSuccess,
};
}
}