From 8d5a88d5bbcce5aaca878e7106a4d52a061a028e Mon Sep 17 00:00:00 2001 From: zhangmeng <494089941@qq.com> Date: Thu, 12 Aug 2021 09:31:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20engineer=20repair=20list?= =?UTF-8?q?=20model?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .fvm/fvm_config.json | 3 ++- lib/const/api.dart | 3 +++ lib/const/engineer_repair.dart | 6 +++++ .../today_clock_record_model.g.dart | 16 ++++++------ .../engineer_repair_list_model.dart | 25 +++++++++++++++++++ .../engineer_repair_list_model.g.dart | 22 ++++++++++++++++ 6 files changed, 66 insertions(+), 9 deletions(-) create mode 100644 lib/const/engineer_repair.dart create mode 100644 lib/json_models/manager/engineer_repair/engineer_repair_list_model.dart create mode 100644 lib/json_models/manager/engineer_repair/engineer_repair_list_model.g.dart diff --git a/.fvm/fvm_config.json b/.fvm/fvm_config.json index 07d62f9..de7d397 100644 --- a/.fvm/fvm_config.json +++ b/.fvm/fvm_config.json @@ -1,3 +1,4 @@ { - "flutterSdkVersion": "2.0.2" + "flutterSdkVersion": "2.0.2", + "flavors": {} } \ No newline at end of file diff --git a/lib/const/api.dart b/lib/const/api.dart index 8e8dfdd..b07ad2a 100644 --- a/lib/const/api.dart +++ b/lib/const/api.dart @@ -1,3 +1,5 @@ +part 'engineer_repair.dart'; + class API { ///HOST static const String host = 'http://39.103.177.88:8804'; @@ -17,6 +19,7 @@ class API { static _Manage manage = _Manage(); static _Upload upload = _Upload(); static _Message message = _Message(); + static _EngineerRepair engineerReapair = _EngineerRepair(); } class _Auth { diff --git a/lib/const/engineer_repair.dart b/lib/const/engineer_repair.dart new file mode 100644 index 0000000..7b4bee1 --- /dev/null +++ b/lib/const/engineer_repair.dart @@ -0,0 +1,6 @@ +part of 'api.dart'; + +class _EngineerRepair { + ///管家app 报事报修工程维修:查询所有的报事报修工程维修信息 + String get engineerRepair => '/user/repairEngineering/list'; +} diff --git a/lib/json_models/clock_in_out/today_clock_record_model.g.dart b/lib/json_models/clock_in_out/today_clock_record_model.g.dart index 35f6a1c..b6b112b 100644 --- a/lib/json_models/clock_in_out/today_clock_record_model.g.dart +++ b/lib/json_models/clock_in_out/today_clock_record_model.g.dart @@ -10,17 +10,17 @@ TodayClockRecordModel _$TodayClockRecordModelFromJson( Map json) { return TodayClockRecordModel( id: json['id'] as int, - startClockDate: json['startClockDate'] as String, - endClockDate: json['endClockDate'] as String, - cardReplacementDate: json['cardReplacementDate'] as String, - operatorName: json['operatorName'] as String, + startClockDate: json['startClockDate'] as String?, + endClockDate: json['endClockDate'] as String?, + cardReplacementDate: json['cardReplacementDate'] as String?, + operatorName: json['operatorName'] as String?, clockName: json['clockName'] as String, clockTel: json['clockTel'] as String, createDate: json['createDate'] as String, status: json['status'] as String, - firstTimeStart: json['firstTimeStart'] as String, - firstTimeEnd: json['firstTimeEnd'] as String, - secondTimeStart: json['secondTimeStart'] as String, - secondTimeEnd: json['secondTimeEnd'] as String, + firstTimeStart: json['firstTimeStart'] as String?, + firstTimeEnd: json['firstTimeEnd'] as String?, + secondTimeStart: json['secondTimeStart'] as String?, + secondTimeEnd: json['secondTimeEnd'] as String?, ); } diff --git a/lib/json_models/manager/engineer_repair/engineer_repair_list_model.dart b/lib/json_models/manager/engineer_repair/engineer_repair_list_model.dart new file mode 100644 index 0000000..7f932bc --- /dev/null +++ b/lib/json_models/manager/engineer_repair/engineer_repair_list_model.dart @@ -0,0 +1,25 @@ +import 'package:aku_community_manager/models/common/img_model.dart'; +import 'package:json_annotation/json_annotation.dart'; +part 'engineer_repair_list_model.g.dart'; + +@JsonSerializable() +class EngineerRepairListModel { + final int id; + final String code; + final int type; + final String reportDetail; + final int status; + final List imgUrls; + final String createDate; + EngineerRepairListModel({ + required this.id, + required this.code, + required this.type, + required this.reportDetail, + required this.status, + required this.imgUrls, + required this.createDate, + }); + factory EngineerRepairListModel.fromJson(Map json) => + _$EngineerRepairListModelFromJson(json); +} diff --git a/lib/json_models/manager/engineer_repair/engineer_repair_list_model.g.dart b/lib/json_models/manager/engineer_repair/engineer_repair_list_model.g.dart new file mode 100644 index 0000000..b3d6a74 --- /dev/null +++ b/lib/json_models/manager/engineer_repair/engineer_repair_list_model.g.dart @@ -0,0 +1,22 @@ +// GENERATED CODE - DO NOT MODIFY BY HAND + +part of 'engineer_repair_list_model.dart'; + +// ************************************************************************** +// JsonSerializableGenerator +// ************************************************************************** + +EngineerRepairListModel _$EngineerRepairListModelFromJson( + Map json) { + return EngineerRepairListModel( + id: json['id'] as int, + code: json['code'] as String, + type: json['type'] as int, + reportDetail: json['reportDetail'] as String, + status: json['status'] as int, + imgUrls: (json['imgUrls'] as List) + .map((e) => ImgModel.fromJson(e as Map)) + .toList(), + createDate: json['createDate'] as String, + ); +}