import 'package:json_annotation/json_annotation.dart'; part 'job_review_submission.g.dart'; @JsonSerializable(includeIfNull: false) class JobReviewSubmission extends Object { @JsonKey(name: 'paperId') int paperId; @JsonKey(name: 'score') int? score; @JsonKey(name: 'commentImageUrl') String? commentImageUrl; @JsonKey(name: 'questions') List questions; JobReviewSubmission({ this.commentImageUrl, required this.score, required this.paperId, required this.questions, }); factory JobReviewSubmission.fromJson(Map srcJson) => _$JobReviewSubmissionFromJson(srcJson); Map toJson() => _$JobReviewSubmissionToJson(this); } @JsonSerializable() class JobReviewQuestions extends Object { @JsonKey(name: 'questionNo') String questionNo; @JsonKey(name: 'score') // 0:错 1:半对 2: 对 int? score; JobReviewQuestions({ required this.questionNo, required this.score, }); factory JobReviewQuestions.fromJson(Map srcJson) => _$JobReviewQuestionsFromJson(srcJson); Map toJson() => _$JobReviewQuestionsToJson(this); }