147 lines
3.1 KiB
Dart
147 lines
3.1 KiB
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'annotated_class.g.dart';
|
|
|
|
|
|
@JsonSerializable()
|
|
class AnnotatedClass extends Object {
|
|
|
|
@JsonKey(name: 'schoolName')
|
|
String schoolName;
|
|
|
|
@JsonKey(name: 'classId')
|
|
String classId;
|
|
|
|
@JsonKey(name: 'className')
|
|
String className;
|
|
|
|
@JsonKey(name: 'finishTime')
|
|
String? finishTime;
|
|
|
|
@JsonKey(name: 'questionCount')
|
|
int questionCount;
|
|
|
|
@JsonKey(name: 'answerCount')
|
|
int answerCount;
|
|
|
|
@JsonKey(name: 'answerRate')
|
|
int answerRate;
|
|
|
|
@JsonKey(name: 'unAnnotateCount')
|
|
int unAnnotateCount;
|
|
|
|
@JsonKey(name: 'annotateRate')
|
|
int annotateRate;
|
|
|
|
@JsonKey(name: 'students')
|
|
List<Students> students;
|
|
|
|
@JsonKey(name: 'homeworkFavs')
|
|
List<HomeworkFavs> homeworkFavs;
|
|
|
|
@JsonKey(name: 'kgtCorrectRate')
|
|
int kgtCorrectRate;
|
|
|
|
@JsonKey(name: 'zgtCorrectRate')
|
|
int zgtCorrectRate;
|
|
|
|
@JsonKey(name: 'correctRate')
|
|
int correctRate;
|
|
|
|
@JsonKey(name: 'commitStudentCount')
|
|
int? commitStudentCount;
|
|
|
|
@JsonKey(name: 'noCommitStudentCount')
|
|
int? noCommitStudentCount;
|
|
|
|
AnnotatedClass(this.schoolName,this.classId,this.className,this.finishTime,this.questionCount,this.answerCount,this.answerRate,this.unAnnotateCount,this.annotateRate,this.students,this.homeworkFavs,this.kgtCorrectRate,this.zgtCorrectRate,this.correctRate,this.commitStudentCount,this.noCommitStudentCount);
|
|
|
|
factory AnnotatedClass.fromJson(Map<String, dynamic> srcJson) => _$AnnotatedClassFromJson(srcJson);
|
|
|
|
Map<String, dynamic> toJson() => _$AnnotatedClassToJson(this);
|
|
|
|
}
|
|
|
|
|
|
@JsonSerializable()
|
|
class Students extends Object {
|
|
|
|
@JsonKey(name: 'id')
|
|
String? id;
|
|
|
|
@JsonKey(name: 'isDeleted')
|
|
bool isDeleted;
|
|
|
|
@JsonKey(name: 'homeworkId')
|
|
String? homeworkId;
|
|
|
|
@JsonKey(name: 'classId')
|
|
String classId;
|
|
|
|
@JsonKey(name: 'studentId')
|
|
int studentId;
|
|
|
|
@JsonKey(name: 'studentName')
|
|
String studentName;
|
|
|
|
@JsonKey(name: 'state')
|
|
int state;
|
|
|
|
Students(this.id,this.isDeleted,this.homeworkId,this.classId,this.studentId,this.studentName,this.state,);
|
|
|
|
factory Students.fromJson(Map<String, dynamic> srcJson) => _$StudentsFromJson(srcJson);
|
|
|
|
Map<String, dynamic> toJson() => _$StudentsToJson(this);
|
|
|
|
}
|
|
|
|
|
|
@JsonSerializable()
|
|
class HomeworkFavs extends Object {
|
|
|
|
@JsonKey(name: 'id')
|
|
String id;
|
|
|
|
@JsonKey(name: 'homeworkId')
|
|
String homeworkId;
|
|
|
|
@JsonKey(name: 'homeworkName')
|
|
String homeworkName;
|
|
|
|
@JsonKey(name: 'grade')
|
|
int grade;
|
|
|
|
@JsonKey(name: 'subject')
|
|
int subject;
|
|
|
|
@JsonKey(name: 'classId')
|
|
String classId;
|
|
|
|
@JsonKey(name: 'className')
|
|
String className;
|
|
|
|
@JsonKey(name: 'studentId')
|
|
int studentId;
|
|
|
|
@JsonKey(name: 'studentName')
|
|
String studentName;
|
|
|
|
@JsonKey(name: 'templateId')
|
|
String templateId;
|
|
|
|
@JsonKey(name: 'questionNo')
|
|
int questionNo;
|
|
|
|
@JsonKey(name: 'subjectiveAnswer')
|
|
String subjectiveAnswer;
|
|
|
|
HomeworkFavs(this.id,this.homeworkId,this.homeworkName,this.grade,this.subject,this.classId,this.className,this.studentId,this.studentName,this.templateId,this.questionNo,this.subjectiveAnswer,);
|
|
|
|
factory HomeworkFavs.fromJson(Map<String, dynamic> srcJson) => _$HomeworkFavsFromJson(srcJson);
|
|
|
|
Map<String, dynamic> toJson() => _$HomeworkFavsToJson(this);
|
|
|
|
}
|
|
|
|
|