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

153 lines
4.1 KiB
Dart

class DashboardDetail {
List<Data>? data;
int? totalRows;
int? count;
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) {
totalRows = json['totalRows'];
count = json['count'];
if (json['data'] != null) {
data = <Data>[];
json['data'].forEach((v) {
data!.add(Data.fromJson(v));
});
}
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? sessionType;
String? rejectReason;
String? assetNumber;
String? requestTypeName;
String? requestNo;
int? transactionNo;
int? numberOfSites;
int? numberOfAssets;
String? nameOfType;
Data(
{this.id,
this.typeTransaction,
this.nameOfType,
this.transactionDate,
this.statusName,
this.numberOfAssets,
this.numberOfSites,
this.sessionType,
this.priorityName,
this.isHighPriority,
this.assetName,
this.assetNumber,
this.requestTypeName,
this.requestNo,
this.transactionNo});
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'];
sessionType = json['sessionType'];
numberOfSites = json['numberOfSites'];
numberOfAssets = json['numberOfAssets'];
assetNumber = json['assetNumber'];
requestTypeName = json['requestTypeName'];
requestNo = json['requestNo'];
rejectReason = json['rejectReason'];
transactionNo = json['transactionNo'];
nameOfType = json['nameOfType'];
}
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;
data['rejectReason'] = rejectReason;
data['transactionNo'] = transactionNo;
data['sessionType'] = sessionType;
data['numberOfAssets'] = numberOfAssets;
data['numberOfSites'] = numberOfSites;
data['nameOfType'] = nameOfType;
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,
};
}
}