
class HeavyListEntity {
  int pageNum;
  int pageCount;
  int total;
  int pageSize;
  bool hasNext;
  bool hasPrev;
  List<HeavyListItem> rows;

  HeavyListEntity.fromJsonMap(Map<String, dynamic> map):
        pageNum = map["pageNum"],
        pageCount = map["pageCount"],
        total = map["total"],
        pageSize = map["pageSize"],
        hasNext = map["hasNext"],
        hasPrev = map["hasPrev"],
        rows = List<HeavyListItem>.from(map["rows"].map((it) => HeavyListItem.fromJsonMap(it)));

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['pageNum'] = pageNum;
    data['pageCount'] = pageCount;
    data['total'] = total;
    data['pageSize'] = pageSize;
    data['hasNext'] = hasNext;
    data['hasPrev'] = hasPrev;
    data['rows'] = rows != null ?
    this.rows.map((v) => v.toJson()).toList()
        : null;
    return data;
  }
}

class HeavyListItem {

  String projectName;
  String projectId;
  String projectCode;
  int projectUsage;
  String actualNum;
  String projectStatus;
  String userId;
  String isMonitor;


  HeavyListItem();
  HeavyListItem.fromJsonMap(Map<String, dynamic> map):
        projectName = map["projectName"]??"",
        projectId = map["projectId"]??"",
        projectCode = map["projectCode"]??"",
        actualNum = map["actualNum"]??"",
        projectStatus = map["projectStatus"]??"",
        userId = map["userId"]??"",
        isMonitor = map["isMonitor"]??"",
        projectUsage = map["projectUsage"]??1;

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['projectName'] = projectName;
    data['projectId'] = projectId;
    data['projectCode'] = projectCode;
    data['actualNum'] = actualNum;
    data['projectStatus'] = projectStatus;
    data['userId'] = userId;
    data['isMonitor'] = isMonitor;
    data['projectUsage'] = projectUsage;
    return data;
  }
}
