class PiaoModelPage {
  List<Records> records;
  int total;
  int size;
  int current;
  bool searchCount;
  int pages;

  PiaoModelPage(
      {this.records,
      this.total,
      this.size,
      this.current,
      this.searchCount,
      this.pages});

  PiaoModelPage.fromJson(Map<String, dynamic> json) {
    if (json['records'] != null) {
      records = new List<Records>();
      json['records'].forEach((v) {
        records.add(new Records.fromJson(v));
      });
    }
    total = json['total'];
    size = json['size'];
    current = json['current'];
    searchCount = json['searchCount'];
    pages = json['pages'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    if (this.records != null) {
      data['records'] = this.records.map((v) => v.toJson()).toList();
    }
    data['total'] = this.total;
    data['size'] = this.size;
    data['current'] = this.current;
    data['searchCount'] = this.searchCount;
    data['pages'] = this.pages;
    return data;
  }
}

class Records {
  int id;
  int createTime;
  String createBy;
  int updateTime;
  String updateBy;
  int userInvoiceId;
  String email;
  String userId;
  String fpqqlsh;
  String kplx;
  String gmfNsrsbm;
  String gmfMc;
  String kpr;
  String skr;
  String fhr;
  double jshj;
  double hjje;
  double hjse;
  String bz;
  String dm;
  String hm;
  int kqrq;
  String fpmw;
  String jym;
  String ewm;
  int statuz;
  String reason;
  int checkFlag;
  int type;
  String gmfYh;
  String gmfZh;
  String gmfDz;
  String gmfDh;
  String invoiceType;
  String receiveTicket;
  String receiveMebile;
  String receiveAddress;
  List<InvoiceImg> invoiceImg;
  List<InvoiceItem> invoiceItem;
  List<LiftCaseEntity> liftCaseEntity;
  UserInvoice userInvoice;

  Records(
      {this.id,
      this.createTime,
      this.createBy,
      this.invoiceType,
      this.updateTime,
      this.updateBy,
      this.userInvoiceId,
      this.email,
      this.userId,
      this.fpqqlsh,
      this.kplx,
      this.gmfNsrsbm,
      this.gmfMc,
      this.kpr,
      this.skr,
      this.fhr,
      this.jshj,
      this.hjje,
      this.hjse,
      this.bz,
      this.dm,
      this.hm,
      this.kqrq,
      this.fpmw,
      this.jym,
      this.ewm,
      this.statuz,
      this.reason,
      this.checkFlag,
      this.type,
      this.gmfYh,
      this.gmfZh,
      this.gmfDz,
      this.gmfDh,
      this.receiveTicket,
      this.receiveMebile,
      this.receiveAddress,
      this.invoiceImg,
      this.invoiceItem,
      this.liftCaseEntity,
      this.userInvoice});

  Records.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    invoiceType = json['invoiceType'];
    receiveTicket = json['receiveTicket'];
    receiveAddress = json['receiveAddress'];
    receiveMebile = json['receiveMebile'];
    invoiceType = json['invoiceType'];
    createTime = json['createTime'];
    createBy = json['createBy'];
    updateTime = json['updateTime'];
    updateBy = json['updateBy'];
    userInvoiceId = json['userInvoiceId'];
    email = json['email'];
    userId = json['userId'];
    fpqqlsh = json['fpqqlsh'];
    kplx = json['kplx'];
    gmfNsrsbm = json['gmfNsrsbm'];
    gmfMc = json['gmfMc'];
    kpr = json['kpr'];
    skr = json['skr'];
    fhr = json['fhr'];
    jshj = json['jshj'];
    hjje = json['hjje'];
    hjse = json['hjse'];
    bz = json['bz'];
    dm = json['dm'];
    hm = json['hm'];
    kqrq = json['kqrq'];
    fpmw = json['fpmw'];
    jym = json['jym'];
    ewm = json['ewm'];
    statuz = json['statuz'];
    reason = json['reason'];
    checkFlag = json['checkFlag'];
    type = json['type'];
    gmfYh = json['gmfYh'];
    gmfZh = json['gmfZh'];
    gmfDz = json['gmfDz'];
    gmfDh = json['gmfDh'];
    if (json['invoiceImg'] != null) {
      invoiceImg = new List<InvoiceImg>();
      json['invoiceImg'].forEach((v) {
        invoiceImg.add(new InvoiceImg.fromJson(v));
      });
    }
    if (json['invoiceItem'] != null) {
      invoiceItem = new List<InvoiceItem>();
      json['invoiceItem'].forEach((v) {
        invoiceItem.add(new InvoiceItem.fromJson(v));
      });
    }
    if (json['liftCaseEntity'] != null) {
      liftCaseEntity = new List<LiftCaseEntity>();
      json['liftCaseEntity'].forEach((v) {
        liftCaseEntity.add(new LiftCaseEntity.fromJson(v));
      });
    }
    userInvoice = json['userInvoice'] != null
        ? new UserInvoice.fromJson(json['userInvoice'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['receiveAddress'] = this.receiveAddress;
    data['receiveMebile'] = this.receiveMebile;
    data['receiveTicket'] = this.receiveTicket;
    data['invoiceType'] = this.invoiceType;
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['createBy'] = this.createBy;
    data['updateTime'] = this.updateTime;
    data['updateBy'] = this.updateBy;
    data['userInvoiceId'] = this.userInvoiceId;
    data['email'] = this.email;
    data['userId'] = this.userId;
    data['fpqqlsh'] = this.fpqqlsh;
    data['kplx'] = this.kplx;
    data['gmfNsrsbm'] = this.gmfNsrsbm;
    data['gmfMc'] = this.gmfMc;
    data['kpr'] = this.kpr;
    data['skr'] = this.skr;
    data['fhr'] = this.fhr;
    data['jshj'] = this.jshj;
    data['hjje'] = this.hjje;
    data['hjse'] = this.hjse;
    data['bz'] = this.bz;
    data['dm'] = this.dm;
    data['hm'] = this.hm;
    data['kqrq'] = this.kqrq;
    data['fpmw'] = this.fpmw;
    data['jym'] = this.jym;
    data['ewm'] = this.ewm;
    data['statuz'] = this.statuz;
    data['reason'] = this.reason;
    data['checkFlag'] = this.checkFlag;
    data['type'] = this.type;
    data['gmfYh'] = this.gmfYh;
    data['gmfZh'] = this.gmfZh;
    data['gmfDz'] = this.gmfDz;
    data['gmfDh'] = this.gmfDh;
    if (this.invoiceImg != null) {
      data['invoiceImg'] = this.invoiceImg.map((v) => v.toJson()).toList();
    }
    if (this.invoiceItem != null) {
      data['invoiceItem'] = this.invoiceItem.map((v) => v.toJson()).toList();
    }
    if (this.liftCaseEntity != null) {
      data['liftCaseEntity'] =
          this.liftCaseEntity.map((v) => v.toJson()).toList();
    }
    if (this.userInvoice != null) {
      data['userInvoice'] = this.userInvoice.toJson();
    }
    return data;
  }
}

class InvoiceImg {
  int id;
  int createTime;
  String createBy;
  int updateTime;
  String updateBy;
  String dataId;
  String url;
  String base64Code;

  InvoiceImg(
      {this.id,
      this.createTime,
      this.createBy,
      this.updateTime,
      this.updateBy,
      this.dataId,
      this.url,
      this.base64Code});

  InvoiceImg.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createTime = json['createTime'];
    createBy = json['createBy'];
    updateTime = json['updateTime'];
    updateBy = json['updateBy'];
    dataId = json['dataId'];
    url = json['url'];
    base64Code = json['base64Code'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['createBy'] = this.createBy;
    data['updateTime'] = this.updateTime;
    data['updateBy'] = this.updateBy;
    data['dataId'] = this.dataId;
    data['url'] = this.url;
    data['base64Code'] = this.base64Code;
    return data;
  }
}

class InvoiceItem {
  int id;
  int createTime;
  String createBy;
  int updateTime;
  String updateBy;
  int dataId;
  int dataType;
  int invoiceId;
  int fphxz;
  String xmmc;
  String dw;
  String ggxh;
  int xmsl;
  double xmdj;
  double xmze;
  double sl;
  double se;

  InvoiceItem(
      {this.id,
      this.createTime,
      this.createBy,
      this.updateTime,
      this.updateBy,
      this.dataId,
      this.dataType,
      this.invoiceId,
      this.fphxz,
      this.xmmc,
      this.dw,
      this.ggxh,
      this.xmsl,
      this.xmdj,
      this.xmze,
      this.sl,
      this.se});

  InvoiceItem.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createTime = json['createTime'];
    createBy = json['createBy'];
    updateTime = json['updateTime'];
    updateBy = json['updateBy'];
    dataId = json['dataId'];
    dataType = json['dataType'];
    invoiceId = json['invoiceId'];
    fphxz = json['fphxz'];
    xmmc = json['xmmc'];
    dw = json['dw'];
    ggxh = json['ggxh'];
    xmsl = json['xmsl'];
    xmdj = json['xmdj'];
    xmze = json['xmze'];
    sl = json['sl'];
    se = json['se'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['createBy'] = this.createBy;
    data['updateTime'] = this.updateTime;
    data['updateBy'] = this.updateBy;
    data['dataId'] = this.dataId;
    data['dataType'] = this.dataType;
    data['invoiceId'] = this.invoiceId;
    data['fphxz'] = this.fphxz;
    data['xmmc'] = this.xmmc;
    data['dw'] = this.dw;
    data['ggxh'] = this.ggxh;
    data['xmsl'] = this.xmsl;
    data['xmdj'] = this.xmdj;
    data['xmze'] = this.xmze;
    data['sl'] = this.sl;
    data['se'] = this.se;
    return data;
  }
}

class UserInvoice {
  int id;
  int createTime;
  String createBy;
  int updateTime;
  String updateBy;
  int type;
  String name;
  String telephone;
  String email;
  String gmfNsrsbm;
  String gmfMc;
  String gmfDz;
  String gmfDh;
  String gmfYh;
  String gmfZh;
  String userId;
  int isDefault;
  String enterpriseNumber;

  UserInvoice(
      {this.id,
      this.createTime,
      this.createBy,
      this.updateTime,
      this.updateBy,
      this.type,
      this.name,
      this.telephone,
      this.email,
      this.gmfNsrsbm,
      this.gmfMc,
      this.gmfDz,
      this.gmfDh,
      this.gmfYh,
      this.gmfZh,
      this.userId,
      this.isDefault,
      this.enterpriseNumber});

  UserInvoice.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createTime = json['createTime'];
    createBy = json['createBy'];
    updateTime = json['updateTime'];
    updateBy = json['updateBy'];
    type = json['type'];
    name = json['name'];
    telephone = json['telephone'];
    email = json['email'];
    gmfNsrsbm = json['gmfNsrsbm'];
    gmfMc = json['gmfMc'];
    gmfDz = json['gmfDz'];
    gmfDh = json['gmfDh'];
    gmfYh = json['gmfYh'];
    gmfZh = json['gmfZh'];
    userId = json['userId'];
    isDefault = json['isDefault'];
    enterpriseNumber = json['enterpriseNumber'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['createBy'] = this.createBy;
    data['updateTime'] = this.updateTime;
    data['updateBy'] = this.updateBy;
    data['type'] = this.type;
    data['name'] = this.name;
    data['telephone'] = this.telephone;
    data['email'] = this.email;
    data['gmfNsrsbm'] = this.gmfNsrsbm;
    data['gmfMc'] = this.gmfMc;
    data['gmfDz'] = this.gmfDz;
    data['gmfDh'] = this.gmfDh;
    data['gmfYh'] = this.gmfYh;
    data['gmfZh'] = this.gmfZh;
    data['userId'] = this.userId;
    data['isDefault'] = this.isDefault;
    data['enterpriseNumber'] = this.enterpriseNumber;
    return data;
  }
}

class LiftCaseEntity {
  int id;
  int createTime;
  String createBy;
  int updateTime;
  String updateBy;
  String expression;
  String usedMethods;
  String imgs;
  int brandId;
  String sessionId;
  String address;
  String chargerId;
  double travelCost;
  double serviceCost;
  double totalCost;
  int arrivedTime;
  int statuz;
  int acceptStatus;
  int arrivedFlag;
  String arrivedAddress;
  int dataTable;
  String createUserId;
  int customerServiceId;
  String name;
  String avatarUrl;
  String brandName;

  LiftCaseEntity(
      {this.id,
      this.createTime,
      this.createBy,
      this.updateTime,
      this.updateBy,
      this.expression,
      this.usedMethods,
      this.imgs,
      this.brandId,
      this.sessionId,
      this.address,
      this.chargerId,
      this.travelCost,
      this.serviceCost,
      this.totalCost,
      this.arrivedTime,
      this.statuz,
      this.acceptStatus,
      this.arrivedFlag,
      this.arrivedAddress,
      this.dataTable,
      this.createUserId,
      this.customerServiceId,
      this.name,
      this.avatarUrl,
      this.brandName});

  LiftCaseEntity.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createTime = json['createTime'];
    createBy = json['createBy'];
    updateTime = json['updateTime'];
    updateBy = json['updateBy'];
    expression = json['expression'];
    usedMethods = json['usedMethods'];
    imgs = json['imgs'];
    brandId = json['brandId'];
    sessionId = json['sessionId'];
    address = json['address'];
    chargerId = json['chargerId'];
    travelCost = json['travelCost'];
    serviceCost = json['serviceCost'];
    totalCost = json['totalCost'];
    arrivedTime = json['arrivedTime'];
    statuz = json['statuz'];
    acceptStatus = json['acceptStatus'];
    arrivedFlag = json['arrivedFlag'];
    arrivedAddress = json['arrivedAddress'];
    dataTable = json['dataTable'];
    createUserId = json['createUserId'];
    customerServiceId = json['customerServiceId'];
    name = json['name'];
    avatarUrl = json['avatarUrl'];
    brandName = json['brandName'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['id'] = this.id;
    data['createTime'] = this.createTime;
    data['createBy'] = this.createBy;
    data['updateTime'] = this.updateTime;
    data['updateBy'] = this.updateBy;
    data['expression'] = this.expression;
    data['usedMethods'] = this.usedMethods;
    data['imgs'] = this.imgs;
    data['brandId'] = this.brandId;
    data['sessionId'] = this.sessionId;
    data['address'] = this.address;
    data['chargerId'] = this.chargerId;
    data['travelCost'] = this.travelCost;
    data['serviceCost'] = this.serviceCost;
    data['totalCost'] = this.totalCost;
    data['arrivedTime'] = this.arrivedTime;
    data['statuz'] = this.statuz;
    data['acceptStatus'] = this.acceptStatus;
    data['arrivedFlag'] = this.arrivedFlag;
    data['arrivedAddress'] = this.arrivedAddress;
    data['dataTable'] = this.dataTable;
    data['createUserId'] = this.createUserId;
    data['customerServiceId'] = this.customerServiceId;
    data['name'] = this.name;
    data['avatarUrl'] = this.avatarUrl;
    data['brandName'] = this.brandName;
    return data;
  }
}