parent
a96f7beb87
commit
d0833caab4
@ -1,134 +0,0 @@
|
||||
import 'package:aku_community/model/common/img_model.dart';
|
||||
|
||||
class FixedDetailModel {
|
||||
AppReportRepairVo? appReportRepairVo;
|
||||
List<AppProcessRecordVo>? appProcessRecordVo;
|
||||
Null appMaintenanceResultVo;
|
||||
AppDispatchListVo? appDispatchListVo;
|
||||
|
||||
FixedDetailModel(
|
||||
{this.appReportRepairVo,
|
||||
this.appProcessRecordVo,
|
||||
this.appMaintenanceResultVo,
|
||||
this.appDispatchListVo});
|
||||
|
||||
FixedDetailModel.fromJson(Map<String, dynamic> json) {
|
||||
appReportRepairVo = json['appReportRepairVo'] != null
|
||||
? new AppReportRepairVo.fromJson(json['appReportRepairVo'])
|
||||
: null;
|
||||
if (json['appProcessRecordVo'] != null) {
|
||||
appProcessRecordVo = [];
|
||||
json['appProcessRecordVo'].forEach((v) {
|
||||
appProcessRecordVo!.add(new AppProcessRecordVo.fromJson(v));
|
||||
});
|
||||
}
|
||||
appMaintenanceResultVo = json['appMaintenanceResultVo'];
|
||||
appDispatchListVo = json['appDispatchListVo'] != null
|
||||
? new AppDispatchListVo.fromJson(json['appDispatchListVo'])
|
||||
: null;
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
if (this.appReportRepairVo != null) {
|
||||
data['appReportRepairVo'] = this.appReportRepairVo!.toJson();
|
||||
}
|
||||
if (this.appProcessRecordVo != null) {
|
||||
data['appProcessRecordVo'] =
|
||||
this.appProcessRecordVo!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
data['appMaintenanceResultVo'] = this.appMaintenanceResultVo;
|
||||
if (this.appDispatchListVo != null) {
|
||||
data['appDispatchListVo'] = this.appDispatchListVo!.toJson();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AppReportRepairVo {
|
||||
int? id;
|
||||
int? type;
|
||||
int? status;
|
||||
String? reportDetail;
|
||||
List<ImgModel>? imgUrls;
|
||||
|
||||
AppReportRepairVo(
|
||||
{this.id, this.type, this.status, this.reportDetail, this.imgUrls});
|
||||
|
||||
AppReportRepairVo.fromJson(Map<String, dynamic> json) {
|
||||
id = json['id'];
|
||||
type = json['type'];
|
||||
status = json['status'];
|
||||
reportDetail = json['reportDetail'];
|
||||
if (json['imgUrls'] != null) {
|
||||
imgUrls = [];
|
||||
json['imgUrls'].forEach((v) {
|
||||
imgUrls!.add(new ImgModel.fromJson(v));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['id'] = this.id;
|
||||
data['type'] = this.type;
|
||||
data['status'] = this.status;
|
||||
data['reportDetail'] = this.reportDetail;
|
||||
if (this.imgUrls != null) {
|
||||
data['imgUrls'] = this.imgUrls!.map((v) => v.toJson()).toList();
|
||||
}
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AppProcessRecordVo {
|
||||
String? operationDate;
|
||||
int? operationType;
|
||||
|
||||
AppProcessRecordVo({this.operationDate, this.operationType});
|
||||
|
||||
AppProcessRecordVo.fromJson(Map<String, dynamic> json) {
|
||||
operationDate = json['operationDate'];
|
||||
operationType = json['operationType'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['operationDate'] = this.operationDate;
|
||||
data['operationType'] = this.operationType;
|
||||
return data;
|
||||
}
|
||||
}
|
||||
|
||||
class AppDispatchListVo {
|
||||
String? code;
|
||||
String? orderDate;
|
||||
int? type;
|
||||
String? operatorName;
|
||||
String? distributorName;
|
||||
|
||||
AppDispatchListVo(
|
||||
{this.code,
|
||||
this.orderDate,
|
||||
this.type,
|
||||
this.operatorName,
|
||||
this.distributorName});
|
||||
|
||||
AppDispatchListVo.fromJson(Map<String, dynamic> json) {
|
||||
code = json['code'];
|
||||
orderDate = json['orderDate'];
|
||||
type = json['type'];
|
||||
operatorName = json['operatorName'];
|
||||
distributorName = json['distributorName'];
|
||||
}
|
||||
|
||||
Map<String, dynamic> toJson() {
|
||||
final Map<String, dynamic> data = new Map<String, dynamic>();
|
||||
data['code'] = this.code;
|
||||
data['orderDate'] = this.orderDate;
|
||||
data['type'] = this.type;
|
||||
data['operatorName'] = this.operatorName;
|
||||
data['distributorName'] = this.distributorName;
|
||||
return data;
|
||||
}
|
||||
}
|
@ -0,0 +1,132 @@
|
||||
import 'package:equatable/equatable.dart';
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
import 'package:aku_community/model/common/img_model.dart';
|
||||
|
||||
part 'fix_detail_model.g.dart';
|
||||
|
||||
@JsonSerializable()
|
||||
class FixDetailModel extends Equatable {
|
||||
final AppReportRepairVo appReportRepairVo;
|
||||
@JsonKey(includeIfNull: true)
|
||||
final List<AppProcessRecordVo> appProcessRecordVo;
|
||||
final AppMaintenanceResultVo? appMaintenanceResultVo;
|
||||
final AppDispatchListVo? appDispatchListVo;
|
||||
FixDetailModel({
|
||||
required this.appReportRepairVo,
|
||||
required this.appProcessRecordVo,
|
||||
this.appMaintenanceResultVo,
|
||||
required this.appDispatchListVo,
|
||||
});
|
||||
factory FixDetailModel.fromJson(Map<String, dynamic> json) =>
|
||||
_$FixDetailModelFromJson(json);
|
||||
@override
|
||||
List<Object?> get props => [
|
||||
appReportRepairVo,
|
||||
appProcessRecordVo,
|
||||
appMaintenanceResultVo,
|
||||
appDispatchListVo
|
||||
];
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class AppReportRepairVo extends Equatable {
|
||||
final int id;
|
||||
final int type;
|
||||
final int status;
|
||||
final String reportDetail;
|
||||
final List<ImgModel> imgUrls;
|
||||
AppReportRepairVo({
|
||||
required this.id,
|
||||
required this.type,
|
||||
required this.status,
|
||||
required this.reportDetail,
|
||||
required this.imgUrls,
|
||||
});
|
||||
|
||||
factory AppReportRepairVo.fromJson(Map<String, dynamic> json) =>
|
||||
_$AppReportRepairVoFromJson(json);
|
||||
@override
|
||||
List<Object> get props {
|
||||
return [
|
||||
id,
|
||||
type,
|
||||
status,
|
||||
reportDetail,
|
||||
imgUrls,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class AppProcessRecordVo extends Equatable {
|
||||
final String operationDate;
|
||||
final int operationType;
|
||||
AppProcessRecordVo({
|
||||
required this.operationDate,
|
||||
required this.operationType,
|
||||
});
|
||||
|
||||
factory AppProcessRecordVo.fromJson(Map<String, dynamic> json) =>
|
||||
_$AppProcessRecordVoFromJson(json);
|
||||
@override
|
||||
List<Object> get props => [operationDate, operationType];
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class AppDispatchListVo extends Equatable {
|
||||
final String code;
|
||||
final String orderDate;
|
||||
final int type;
|
||||
final String operatorName;
|
||||
final String distributorName;
|
||||
AppDispatchListVo({
|
||||
required this.code,
|
||||
required this.orderDate,
|
||||
required this.type,
|
||||
required this.operatorName,
|
||||
required this.distributorName,
|
||||
});
|
||||
|
||||
factory AppDispatchListVo.fromJson(Map<String, dynamic> json) =>
|
||||
_$AppDispatchListVoFromJson(json);
|
||||
@override
|
||||
List<Object> get props {
|
||||
return [
|
||||
code,
|
||||
orderDate,
|
||||
type,
|
||||
operatorName,
|
||||
distributorName,
|
||||
];
|
||||
}
|
||||
}
|
||||
|
||||
@JsonSerializable()
|
||||
class AppMaintenanceResultVo extends Equatable {
|
||||
final int id;
|
||||
final num? laborCost;
|
||||
final num? materialCost;
|
||||
final num? totalCost;
|
||||
final List<ImgModel> imgUrls;
|
||||
AppMaintenanceResultVo({
|
||||
required this.id,
|
||||
this.laborCost,
|
||||
this.materialCost,
|
||||
this.totalCost,
|
||||
required this.imgUrls,
|
||||
});
|
||||
|
||||
factory AppMaintenanceResultVo.fromJson(Map<String, dynamic> json) =>
|
||||
_$AppMaintenanceResultVoFromJson(json);
|
||||
@override
|
||||
List<Object?> get props {
|
||||
return [
|
||||
id,
|
||||
laborCost,
|
||||
materialCost,
|
||||
totalCost,
|
||||
imgUrls,
|
||||
];
|
||||
}
|
||||
}
|
@ -0,0 +1,67 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of 'fix_detail_model.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
FixDetailModel _$FixDetailModelFromJson(Map<String, dynamic> json) {
|
||||
return FixDetailModel(
|
||||
appReportRepairVo: AppReportRepairVo.fromJson(
|
||||
json['appReportRepairVo'] as Map<String, dynamic>),
|
||||
appProcessRecordVo: (json['appProcessRecordVo'] as List<dynamic>)
|
||||
.map((e) => AppProcessRecordVo.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
appMaintenanceResultVo: json['appMaintenanceResultVo'] == null
|
||||
? null
|
||||
: AppMaintenanceResultVo.fromJson(
|
||||
json['appMaintenanceResultVo'] as Map<String, dynamic>),
|
||||
appDispatchListVo: json['appDispatchListVo'] == null
|
||||
? null
|
||||
: AppDispatchListVo.fromJson(
|
||||
json['appDispatchListVo'] as Map<String, dynamic>),
|
||||
);
|
||||
}
|
||||
|
||||
AppReportRepairVo _$AppReportRepairVoFromJson(Map<String, dynamic> json) {
|
||||
return AppReportRepairVo(
|
||||
id: json['id'] as int,
|
||||
type: json['type'] as int,
|
||||
status: json['status'] as int,
|
||||
reportDetail: json['reportDetail'] as String,
|
||||
imgUrls: (json['imgUrls'] as List<dynamic>)
|
||||
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
||||
|
||||
AppProcessRecordVo _$AppProcessRecordVoFromJson(Map<String, dynamic> json) {
|
||||
return AppProcessRecordVo(
|
||||
operationDate: json['operationDate'] as String,
|
||||
operationType: json['operationType'] as int,
|
||||
);
|
||||
}
|
||||
|
||||
AppDispatchListVo _$AppDispatchListVoFromJson(Map<String, dynamic> json) {
|
||||
return AppDispatchListVo(
|
||||
code: json['code'] as String,
|
||||
orderDate: json['orderDate'] as String,
|
||||
type: json['type'] as int,
|
||||
operatorName: json['operatorName'] as String,
|
||||
distributorName: json['distributorName'] as String,
|
||||
);
|
||||
}
|
||||
|
||||
AppMaintenanceResultVo _$AppMaintenanceResultVoFromJson(
|
||||
Map<String, dynamic> json) {
|
||||
return AppMaintenanceResultVo(
|
||||
id: json['id'] as int,
|
||||
laborCost: json['laborCost'] as num?,
|
||||
materialCost: json['materialCost'] as num?,
|
||||
totalCost: json['totalCost'] as num?,
|
||||
imgUrls: (json['imgUrls'] as List<dynamic>)
|
||||
.map((e) => ImgModel.fromJson(e as Map<String, dynamic>))
|
||||
.toList(),
|
||||
);
|
||||
}
|
Loading…
Reference in new issue