/*
 * @Author: WuXiangNan
 * @Date: 2021-07-05 09:53:14
 * @LastEditors: WuXiangNan
 * @LastEditTime: 2021-07-05 10:01:48
 * @Description: 文件柜目录列表
 */

import 'package:cabinet_package/src/models/directory_list.dart';

class CabinetDirectory {
  int? pageNum;
  int? pageSize;
  int? pages;
  int? total;
  List<DirectoryList>? list;

  CabinetDirectory({this.total, this.pages, this.pageSize, this.pageNum,this.list});

  CabinetDirectory.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});
    pageNum = map['pageNum'];
    pageSize = map['pageSize'];
    pages = map['pages'];
    total = map['total'];
    list = List<DirectoryList>.from((map['list'] ?? []).map((e) => DirectoryList.fromJson(e)));
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['pageNum'] = this.pageNum;
    json['pageSize'] = this.pageSize;
    json['pages'] = this.pages;
    json['total'] = this.total;
    json['list'] = List<DirectoryList>.from((this.list ?? []).map((e) => e.toJson()));

    return json;
  }
}
