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? rejectReason;
  String? assetNumber;
  String? requestTypeName;
  String? requestNo;
  int? transactionNo;
  String? nameOfType;

  Data({this.id, this.typeTransaction, this.nameOfType,this.transactionDate, this.statusName, 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'];
    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['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,
    };
  }
}
