Making.School.Asignment.app/lib/common/job/student_personal_info.dart

105 lines
2.2 KiB
Dart

import 'package:json_annotation/json_annotation.dart';
part 'student_personal_info.g.dart';
@JsonSerializable()
class StudentPersonalInfo extends Object {
@JsonKey(name: 'studentId')
int studentId;
@JsonKey(name: 'studentName')
String studentName;
@JsonKey(name: 'correctRate')
int correctRate;
@JsonKey(name: 'kgtCorrectRate')
int kgtCorrectRate;
@JsonKey(name: 'kgtList')
List<KgtList> kgtList;
@JsonKey(name: 'zgtCorrectRate')
int zgtCorrectRate;
@JsonKey(name: 'zgtList')
List<ZgtList> zgtList;
StudentPersonalInfo(this.studentId,this.studentName,this.correctRate,this.kgtCorrectRate,this.kgtList,this.zgtCorrectRate,this.zgtList,);
factory StudentPersonalInfo.fromJson(Map<String, dynamic> srcJson) => _$StudentPersonalInfoFromJson(srcJson);
Map<String, dynamic> toJson() => _$StudentPersonalInfoToJson(this);
}
@JsonSerializable()
class KgtList extends Object {
@JsonKey(name: 'templateId')
int templateId;
@JsonKey(name: 'questionNo')
int questionNo;
@JsonKey(name: 'answer')
String? answer;
@JsonKey(name: 'studentAnswer')
String? studentAnswer;
@JsonKey(name: 'useTime')
int useTime;
@JsonKey(name: 'isCorrect')
bool? isCorrect;
@JsonKey(name: 'picture')
String? picture;
KgtList(this.templateId,this.questionNo,this.answer,this.studentAnswer,this.useTime,this.isCorrect,this.picture,);
factory KgtList.fromJson(Map<String, dynamic> srcJson) => _$KgtListFromJson(srcJson);
Map<String, dynamic> toJson() => _$KgtListToJson(this);
}
@JsonSerializable()
class ZgtList extends Object {
@JsonKey(name: 'templateId')
int templateId;
@JsonKey(name: 'questionNo')
int questionNo;
@JsonKey(name: 'answer')
String? answer;
@JsonKey(name: 'studentAnswer')
String? studentAnswer;
@JsonKey(name: 'useTime')
int useTime;
@JsonKey(name: 'isCorrect')
bool? isCorrect;
@JsonKey(name: 'picture')
String? picture;
ZgtList(this.templateId,this.questionNo,this.answer,this.studentAnswer,this.useTime,this.isCorrect,this.picture,);
factory ZgtList.fromJson(Map<String, dynamic> srcJson) => _$ZgtListFromJson(srcJson);
Map<String, dynamic> toJson() => _$ZgtListToJson(this);
}