//***************************************************************** // Generate by vsc-wisdom-flutter-kit //***************************************************************** ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/9806](http://yapi.wisdomcity.com.cn/project/40/interface/api/9806) /// ///update 2020-10-14 17:43:17 /// ///住户表列表 // ignore: library_names library meterReading_house.get; import 'response_model.dart'; import 'package:dio/dio.dart'; ///[http://yapi.wisdomcity.com.cn/project/40/interface/api/9806](http://yapi.wisdomcity.com.cn/project/40/interface/api/9806) /// ///update 2020-10-14 17:43:17 /// ///住户表列表 class Interface { Interface._(); static const String path = '/app/admin/meterReading/house'; static const String method = 'get'; static Future>> request( Dio dio, { Options? options, Map? pathParameters, Map? queryParameters, data, CancelToken? cancelToken, ProgressCallback? onSendProgress, ProgressCallback? onReceiveProgress, }) async { // final _options = options != null ? options.copyWith(method: method) : null; final res = await dio.request( _path(pathParameters ?? {}), data: data, queryParameters: queryParameters, cancelToken: cancelToken, options: Options(method: 'get'), onSendProgress: onSendProgress, onReceiveProgress: onReceiveProgress, ); return ResponseModel( json: res.data, to: (v) => v.toJson(), from: (v) => ResponsePagingModel( json: v, to: (v) => v.toJson(), from: (v) => $DataModel.fromJson(v), ), ); } static String _path(Map pathParameters) { String back = path; for (final key in pathParameters.keys) { back = back.replaceAll('{$key}', pathParameters[key].toString()); } return back; } } ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806 /// /// /// ///`roomNo` /// ///`meterHouseInfos` /// // ignore: camel_case_types class $DataModel { ///`roomNo` late String roomNo; ///`meterHouseInfos` late List<$JuniorMeterHouseInfosModel> meterHouseInfos; ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806 /// /// /// ///`roomNo` /// ///`meterHouseInfos` $DataModel({ required this.roomNo, required this.meterHouseInfos, }); $DataModel.fromJson(json) { Map map = Map.from(json); this.roomNo = map['roomNo']; if (map['meterHouseInfos'] != null) this.meterHouseInfos = List.of(map['meterHouseInfos']) .map((e) => $JuniorMeterHouseInfosModel.fromJson(e ?? {})) .toList(); } Map toJson() { Map json = Map(); json['roomNo'] = this.roomNo; json['meterHouseInfos'] = this.meterHouseInfos.map((e) => e.toJson()).toList(); return Map.from(json); } } ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806 /// /// /// ///`id` /// ///`houseId` 房屋id /// ///`roomNo` 房屋名称 /// ///`meterName` 仪表名称 /// ///`meterType` 表类型枚举 /// ///`meterCode` 表编号 /// ///`initalAmount` 初始读数 /// ///`backhaulAmount` 仪表回程(最大读数) /// ///`multiple` 倍数 /// ///`lastAmount` 上次最新读数 /// ///`transcribes` 本期是否抄表 /// ///`transcribeDate` 表时间 /// ///`readerDate` 抄表日期 /// ///`lastActualAmount` 实际行度 /// // ignore: camel_case_types class $JuniorMeterHouseInfosModel { ///`id` String? id; ///`houseId` 房屋id String? houseId; ///`roomNo` 房屋名称 String? roomNo; ///`meterName` 仪表名称 String? meterName; ///`meterType` 表类型枚举 $JuniorMeterTypeModel? meterType; ///`meterCode` 表编号 String? meterCode; ///`initalAmount` 初始读数 num? initalAmount; ///`backhaulAmount` 仪表回程(最大读数) num? backhaulAmount; ///`multiple` 倍数 num? multiple; ///`lastAmount` 上次最新读数 num? lastAmount; ///`transcribes` 本期是否抄表 bool? transcribes; ///`transcribeDate` 表时间 String? transcribeDate; ///`readerDate` 抄表日期 String? readerDate; ///`lastActualAmount` 实际行度 num? lastActualAmount; ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806 /// /// /// ///`id` /// ///`houseId` 房屋id /// ///`roomNo` 房屋名称 /// ///`meterName` 仪表名称 /// ///`meterType` 表类型枚举 /// ///`meterCode` 表编号 /// ///`initalAmount` 初始读数 /// ///`backhaulAmount` 仪表回程(最大读数) /// ///`multiple` 倍数 /// ///`lastAmount` 上次最新读数 /// ///`transcribes` 本期是否抄表 /// ///`transcribeDate` 表时间 /// ///`readerDate` 抄表日期 /// ///`lastActualAmount` 实际行度 $JuniorMeterHouseInfosModel({ this.id, this.houseId, this.roomNo, this.meterName, this.meterType, this.meterCode, this.initalAmount, this.backhaulAmount, this.multiple, this.lastAmount, this.transcribes, this.transcribeDate, this.readerDate, this.lastActualAmount, }); $JuniorMeterHouseInfosModel.fromJson(json) { Map map = Map.from(json); this.id = map['id']; this.houseId = map['houseId']; this.roomNo = map['roomNo']; this.meterName = map['meterName']; if (map['meterType'] != null) this.meterType = $JuniorMeterTypeModel.fromJson(map['meterType']); this.meterCode = map['meterCode']; this.initalAmount = map['initalAmount']; this.backhaulAmount = map['backhaulAmount']; this.multiple = map['multiple']; this.lastAmount = map['lastAmount']; this.transcribes = map['transcribes']; this.transcribeDate = map['transcribeDate']; this.readerDate = map['readerDate']; this.lastActualAmount = map['lastActualAmount']; } Map toJson() { Map json = Map(); json['id'] = this.id; json['houseId'] = this.houseId; json['roomNo'] = this.roomNo; json['meterName'] = this.meterName; json['meterType'] = this.meterType?.toJson(); json['meterCode'] = this.meterCode; json['initalAmount'] = this.initalAmount; json['backhaulAmount'] = this.backhaulAmount; json['multiple'] = this.multiple; json['lastAmount'] = this.lastAmount; json['transcribes'] = this.transcribes; json['transcribeDate'] = this.transcribeDate; json['readerDate'] = this.readerDate; json['lastActualAmount'] = this.lastActualAmount; return Map.from(json); } } ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806 /// ///表类型枚举 /// ///`code` /// ///`name` /// // ignore: camel_case_types class $JuniorMeterTypeModel { ///`code` String? code; ///`name` String? name; ///http://yapi.wisdomcity.com.cn/project/40/interface/api/9806 /// ///表类型枚举 /// ///`code` /// ///`name` $JuniorMeterTypeModel({ this.code, this.name, }); $JuniorMeterTypeModel.fromJson(json) { Map map = Map.from(json); this.code = map['code']; this.name = map['name']; } Map toJson() { Map json = Map(); json['code'] = this.code; json['name'] = this.name; return Map.from(json); } }