app-starlock/lib/mine/minePersonInfo/minePersonInfoSetSafetyProblem/minePersonInfoSetSafetyProblem_entity.dart
2024-05-18 09:37:50 +08:00

147 lines
3.7 KiB
Dart
Executable File

class MineSetSafetyProblemEntity {
int? errorCode;
String? description;
String? errorMsg;
Data? data;
MineSetSafetyProblemEntity(
{this.errorCode, this.description, this.errorMsg, this.data});
MineSetSafetyProblemEntity.fromJson(Map<String, dynamic> json) {
errorCode = json['errorCode'];
description = json['description'];
errorMsg = json['errorMsg'];
data = json['data'] != null ? Data.fromJson(json['data']) : null;
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['errorCode'] = errorCode;
data['description'] = description;
data['errorMsg'] = errorMsg;
if (this.data != null) {
data['data'] = this.data!.toJson();
}
return data;
}
}
class Data {
List<SafetyProblemData>? firstList;
List<SafetyProblemData>? secondList;
List<SafetyProblemData>? thirdList;
Data({this.firstList, this.secondList, this.thirdList});
Data.fromJson(Map<String, dynamic> json) {
if (json['firstList'] != null) {
firstList = <SafetyProblemData>[];
json['firstList'].forEach((v) {
firstList!.add(SafetyProblemData.fromJson(v));
});
}
if (json['secondList'] != null) {
secondList = <SafetyProblemData>[];
json['secondList'].forEach((v) {
secondList!.add(SafetyProblemData.fromJson(v));
});
}
if (json['thirdList'] != null) {
thirdList = <SafetyProblemData>[];
json['thirdList'].forEach((v) {
thirdList!.add(SafetyProblemData.fromJson(v));
});
}
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
if (firstList != null) {
data['firstList'] = firstList!.map((v) => v.toJson()).toList();
}
if (secondList != null) {
data['secondList'] = secondList!.map((v) => v.toJson()).toList();
}
if (thirdList != null) {
data['thirdList'] = thirdList!.map((v) => v.toJson()).toList();
}
return data;
}
}
class SafetyProblemData {
int? questionId;
String? question;
String? answer;
int? answerId;
SafetyProblemData({this.questionId, this.question});
SafetyProblemData.fromJson(Map<String, dynamic> json) {
questionId = json['questionId'];
question = json['question'];
answer = json['answer'];
answerId = json['answerId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['questionId'] = questionId;
data['question'] = question;
data['answer'] = answer;
data['answerId'] = answerId;
return data;
}
}
class SafetyProblemData2 {
int? questionId;
String? question;
String? answer;
int? answerId;
SafetyProblemData2({this.questionId, this.question});
SafetyProblemData2.fromJson(Map<String, dynamic> json) {
questionId = json['questionId'];
question = json['question'];
answer = json['answer'];
answerId = json['answerId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['questionId'] = questionId;
data['question'] = question;
data['answer'] = answer;
data['answerId'] = answerId;
return data;
}
}
class SafetyProblemData3 {
int? questionId;
String? question;
String? answer;
int? answerId;
SafetyProblemData3({this.questionId, this.question});
SafetyProblemData3.fromJson(Map<String, dynamic> json) {
questionId = json['questionId'];
question = json['question'];
answer = json['answer'];
answerId = json['answerId'];
}
Map<String, dynamic> toJson() {
final Map<String, dynamic> data = <String, dynamic>{};
data['questionId'] = questionId;
data['question'] = question;
data['answer'] = answer;
data['answerId'] = answerId;
return data;
}
}