241 lines
5.0 KiB
Dart
241 lines
5.0 KiB
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'homework_details.g.dart';
|
|
|
|
|
|
@JsonSerializable()
|
|
class HomeworkDetails extends Object {
|
|
|
|
@JsonKey(name: 'questions')
|
|
List<Questions> questions;
|
|
|
|
@JsonKey(name: 'knows')
|
|
List<Knows> knows;
|
|
|
|
@JsonKey(name: 'students')
|
|
List<Students> students;
|
|
|
|
@JsonKey(name: 'dtls')
|
|
List<Dtls> dtls;
|
|
|
|
HomeworkDetails(this.questions,this.knows,this.students,this.dtls);
|
|
|
|
factory HomeworkDetails.fromJson(Map<String, dynamic> srcJson) => _$HomeworkDetailsFromJson(srcJson);
|
|
|
|
Map<String, dynamic> toJson() => _$HomeworkDetailsToJson(this);
|
|
|
|
}
|
|
|
|
|
|
@JsonSerializable()
|
|
class Questions extends Object {
|
|
|
|
@JsonKey(name: 'id')
|
|
String id;
|
|
|
|
@JsonKey(name: 'templateId')
|
|
int templateId;
|
|
|
|
@JsonKey(name: 'questionNo')
|
|
int questionNo;
|
|
|
|
@JsonKey(name: 'questionType')
|
|
int questionType;
|
|
|
|
@JsonKey(name: 'answer')
|
|
String? answer;
|
|
|
|
@JsonKey(name: 'score')
|
|
int? score;
|
|
|
|
@JsonKey(name: 'questionPicture')
|
|
String? questionPicture;
|
|
|
|
@JsonKey(name: 'subjectivePicture')
|
|
String? subjectivePicture;
|
|
|
|
@JsonKey(name: 'knows')
|
|
List<Knows> knows;
|
|
|
|
@JsonKey(name: 'answerCount')
|
|
int? answerCount;
|
|
|
|
@JsonKey(name: 'answerRate')
|
|
double? answerRate;
|
|
|
|
@JsonKey(name: 'okRate')
|
|
double? okRate;
|
|
|
|
@JsonKey(name: 'priorityInfo')
|
|
List<Dtls>? priorityInfo;
|
|
|
|
@JsonKey(name: 'noAnswerStudents')
|
|
List<Dtls>? noAnswerStudents;
|
|
|
|
@JsonKey(name: 'answerOkStudents')
|
|
List<Dtls>? answerOkStudents;
|
|
|
|
@JsonKey(name: 'answerNgStudents')
|
|
List<Dtls>? answerNgStudents;
|
|
|
|
Questions(this.id,this.templateId,this.questionNo,this.questionType,this.answer,this.score,this.questionPicture,this.subjectivePicture,this.knows,this.answerCount,
|
|
this.answerRate,this.okRate,this.priorityInfo,this.noAnswerStudents,this.answerOkStudents,this.answerNgStudents);
|
|
|
|
factory Questions.fromJson(Map<String, dynamic> srcJson) => _$QuestionsFromJson(srcJson);
|
|
|
|
Map<String, dynamic> toJson() => _$QuestionsToJson(this);
|
|
|
|
}
|
|
|
|
|
|
@JsonSerializable()
|
|
class Knows extends Object {
|
|
|
|
@JsonKey(name: 'knowledgeId')
|
|
int knowledgeId;
|
|
|
|
@JsonKey(name: 'knowledgeName')
|
|
String knowledgeName;
|
|
|
|
@JsonKey(name: 'okCount')
|
|
int? okCount;
|
|
|
|
@JsonKey(name: 'ttlCount')
|
|
int? ttlCount;
|
|
|
|
@JsonKey(name: 'okRate')
|
|
double? okRate;
|
|
|
|
@JsonKey(name: 'queDtls')
|
|
List<Dtls>? queDtls;
|
|
|
|
Knows(this.knowledgeId,this.knowledgeName,this.okCount,this.ttlCount,this.okRate,this.queDtls);
|
|
|
|
factory Knows.fromJson(Map<String, dynamic> srcJson) => _$KnowsFromJson(srcJson);
|
|
|
|
Map<String, dynamic> toJson() => _$KnowsToJson(this);
|
|
|
|
}
|
|
|
|
|
|
@JsonSerializable()
|
|
class Students extends Object {
|
|
|
|
@JsonKey(name: 'studentId')
|
|
int studentId;
|
|
|
|
@JsonKey(name: 'studentName')
|
|
String studentName;
|
|
|
|
@JsonKey(name: 'state')
|
|
int state;
|
|
|
|
@JsonKey(name: 'priorityAnnotate')
|
|
bool priorityAnnotate;
|
|
|
|
@JsonKey(name: 'kgtStu')
|
|
List<Dtls>? kgtStu;
|
|
|
|
@JsonKey(name: 'kgtOkCount')
|
|
int? kgtOkCount;
|
|
|
|
@JsonKey(name: 'kgtErrorCount')
|
|
int? kgtErrorCount;
|
|
|
|
@JsonKey(name: 'kgtAnswerCount')
|
|
int? kgtAnswerCount;
|
|
|
|
@JsonKey(name: 'zgtStu')
|
|
List<Dtls>? zgtStu;
|
|
|
|
@JsonKey(name: 'zgtOkCount')
|
|
int? zgtOkCount;
|
|
|
|
@JsonKey(name: 'zgtErrorCount')
|
|
int? zgtErrorCount;
|
|
|
|
@JsonKey(name: 'zgtAnswerCount')
|
|
int? zgtAnswerCount;
|
|
|
|
@JsonKey(name: 'zgtUnrated')
|
|
int? zgtUnrated;
|
|
|
|
@JsonKey(name: 'allOk')
|
|
int? allOk;
|
|
|
|
@JsonKey(name: 'allNotDone')
|
|
bool? allNotDone;
|
|
|
|
@JsonKey(name: 'queDtls')
|
|
List<Dtls>? queDtls;
|
|
|
|
@JsonKey(name: 'okRate')
|
|
double? okRate;
|
|
|
|
@JsonKey(name: 'noAnswerCount')
|
|
int? noAnswerCount;
|
|
|
|
@JsonKey(name: 'useTime')
|
|
int? useTime;
|
|
|
|
Students(this.studentId,this.studentName,this.state,this.priorityAnnotate,this.kgtStu,this.kgtOkCount,this.kgtAnswerCount,this.zgtStu,this.zgtAnswerCount,this.zgtOkCount,this.allOk,this.kgtErrorCount,this.zgtErrorCount,this.zgtUnrated,this.allNotDone,this.queDtls,this.okRate,this.noAnswerCount,this.useTime);
|
|
|
|
factory Students.fromJson(Map<String, dynamic> srcJson) => _$StudentsFromJson(srcJson);
|
|
|
|
Map<String, dynamic> toJson() => _$StudentsToJson(this);
|
|
|
|
}
|
|
|
|
|
|
@JsonSerializable()
|
|
class Dtls extends Object {
|
|
|
|
@JsonKey(name: 'id')
|
|
String id;
|
|
|
|
@JsonKey(name: 'classId')
|
|
String? classId;
|
|
|
|
@JsonKey(name: 'studentId')
|
|
int studentId;
|
|
|
|
@JsonKey(name: 'studentName')
|
|
String? studentName;
|
|
|
|
@JsonKey(name: 'templateId')
|
|
int? templateId;
|
|
|
|
@JsonKey(name: 'questionNo')
|
|
int questionNo;
|
|
|
|
@JsonKey(name: 'questionType')
|
|
int questionType;
|
|
|
|
@JsonKey(name: 'studentAnswer')
|
|
String? studentAnswer;
|
|
|
|
@JsonKey(name: 'state')
|
|
int state;
|
|
|
|
@JsonKey(name: 'useTime')
|
|
int useTime;
|
|
|
|
@JsonKey(name: 'annotatePicture')
|
|
String? annotatePicture;
|
|
|
|
@JsonKey(name: 'answer')
|
|
String? answer;
|
|
|
|
@JsonKey(name: 'questionPicture')
|
|
String? questionPicture;
|
|
|
|
Dtls(this.id,this.classId,this.studentId,this.templateId,this.questionNo,this.questionType,this.studentAnswer,this.state,this.useTime,this.annotatePicture,this.studentName,this.answer,this.questionPicture);
|
|
|
|
factory Dtls.fromJson(Map<String, dynamic> srcJson) => _$DtlsFromJson(srcJson);
|
|
|
|
Map<String, dynamic> toJson() => _$DtlsToJson(this);
|
|
|
|
}
|
|
|
|
|