import 'package:json_annotation/json_annotation.dart'; part 'student_history.g.dart'; @JsonSerializable() class StudentHistory extends Object { @JsonKey(name: 'kgtCorrectRate') int kgtCorrectRate; @JsonKey(name: 'zgtCorrectRate') int zgtCorrectRate; @JsonKey(name: 'items') Items items; @JsonKey(name: 'correctRate') int correctRate; StudentHistory(this.kgtCorrectRate,this.zgtCorrectRate,this.items,this.correctRate); factory StudentHistory.fromJson(Map srcJson) => _$StudentHistoryFromJson(srcJson); Map toJson() => _$StudentHistoryToJson(this); } @JsonSerializable() class Items extends Object { @JsonKey(name: 'items') List items; @JsonKey(name: 'totalCount') int totalCount; Items(this.items,this.totalCount,); factory Items.fromJson(Map srcJson) => _$ItemsFromJson(srcJson); Map toJson() => _$ItemsToJson(this); } @JsonSerializable() class StudentItems extends Object { @JsonKey(name: 'id') String id; @JsonKey(name: 'assessType') int assessType; @JsonKey(name: 'name') String name; @JsonKey(name: 'grade') int grade; @JsonKey(name: 'subject') int subject; @JsonKey(name: 'publishTime') String publishTime; @JsonKey(name: 'state') int state; @JsonKey(name: 'kgtCorrectRate') int kgtCorrectRate; @JsonKey(name: 'kgtList') List kgtList; @JsonKey(name: 'zgtCorrectRate') int zgtCorrectRate; @JsonKey(name: 'zgtList') List zgtList; @JsonKey(name: 'correctRate') int correctRate; //全部未做 @JsonKey(name: 'allNotDone') bool allNotDone; StudentItems(this.id,this.assessType,this.name,this.grade,this.subject,this.publishTime,this.state,this.kgtCorrectRate,this.kgtList,this.zgtCorrectRate,this.zgtList,this.correctRate, [this.allNotDone = false]); factory StudentItems.fromJson(Map srcJson) => _$StudentItemsFromJson(srcJson); Map toJson() => _$StudentItemsToJson(this); } @JsonSerializable() class KgtList extends Object { @JsonKey(name: 'id') String id; @JsonKey(name: 'questionNo') int questionNo; @JsonKey(name: 'questionType') int questionType; @JsonKey(name: 'state') int state; @JsonKey(name: 'useTime') int? useTime; @JsonKey(name: 'picture') String? picture; KgtList(this.id,this.questionNo,this.questionType,this.state,this.useTime,this.picture,); factory KgtList.fromJson(Map srcJson) => _$KgtListFromJson(srcJson); Map toJson() => _$KgtListToJson(this); } @JsonSerializable() class ZgtList extends Object { @JsonKey(name: 'id') String id; @JsonKey(name: 'questionNo') int questionNo; @JsonKey(name: 'questionType') int questionType; @JsonKey(name: 'state') int state; @JsonKey(name: 'useTime') int? useTime; @JsonKey(name: 'picture') String? picture; ZgtList(this.id,this.questionNo,this.questionType,this.state,this.useTime,this.picture,); factory ZgtList.fromJson(Map srcJson) => _$ZgtListFromJson(srcJson); Map toJson() => _$ZgtListToJson(this); }