添加 engineer repair list model

hmxc
张萌 3 years ago
parent 7441b73fb3
commit 8d5a88d5bb

@ -1,3 +1,4 @@
{
"flutterSdkVersion": "2.0.2"
"flutterSdkVersion": "2.0.2",
"flavors": {}
}

@ -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 {

@ -0,0 +1,6 @@
part of 'api.dart';
class _EngineerRepair {
///app
String get engineerRepair => '/user/repairEngineering/list';
}

@ -10,17 +10,17 @@ TodayClockRecordModel _$TodayClockRecordModelFromJson(
Map<String, dynamic> 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?,
);
}

@ -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<ImgModel> 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<String, dynamic> json) =>
_$EngineerRepairListModelFromJson(json);
}

@ -0,0 +1,22 @@
// GENERATED CODE - DO NOT MODIFY BY HAND
part of 'engineer_repair_list_model.dart';
// **************************************************************************
// JsonSerializableGenerator
// **************************************************************************
EngineerRepairListModel _$EngineerRepairListModelFromJson(
Map<String, dynamic> 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<dynamic>)
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
.toList(),
createDate: json['createDate'] as String,
);
}
Loading…
Cancel
Save