/*
 * @Author: WuWei
 * @Date: 2020-06-10 14:51:52
 * @LastEditors: WuWei
 * @LastEditTime: 2020-06-10 14:52:23
 * @Description:
 */
/// 房屋 抄表情况
class SearchHouseMeterModel {
  String? meterName;
  String? meterType;
  num? multiple;
  List<LatelyAmountsOfSearchHouseMeterModel>? latelyAmounts;

  SearchHouseMeterModel({
    this.meterName,
    this.meterType,
    this.multiple,
    this.latelyAmounts,
  });

  SearchHouseMeterModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    meterName = map['meterName'];
    meterType = map['meterType'];
    multiple = map['multiple'];
    latelyAmounts = List<LatelyAmountsOfSearchHouseMeterModel>.from(
        (map["latelyAmounts"] ?? [])
            .map((x) => LatelyAmountsOfSearchHouseMeterModel.fromJson(x)));
  }

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

    json['meterName'] = this.meterName;
    json['meterType'] = this.meterType;
    json['multiple'] = this.multiple;
    json['latelyAmounts'] =
        List<dynamic>.from((latelyAmounts ?? []).map((x) => x.toJson()));

    return json;
  }
}

class LatelyAmountsOfSearchHouseMeterModel {
  String? readerDate;
  num? transcribeAmount;
  num? chargeAmount;
  num? actualAmount;
  bool? changeMeter;

  LatelyAmountsOfSearchHouseMeterModel({
    this.readerDate,
    this.transcribeAmount,
    this.chargeAmount,
    this.actualAmount,
    this.changeMeter,
  });

  LatelyAmountsOfSearchHouseMeterModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    readerDate = map['readerDate'];
    transcribeAmount = map['transcribeAmount'];
    chargeAmount = map['chargeAmount'];
    actualAmount = map['actualAmount'];
    changeMeter = map['changeMeter'];
  }

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

    json['readerDate'] = this.readerDate;
    json['transcribeAmount'] = this.transcribeAmount;
    json['chargeAmount'] = this.chargeAmount;
    json['actualAmount'] = this.actualAmount;
    json['changeMeter'] = this.changeMeter;

    return json;
  }
}
