Marking.Client.Moblie/marking_app/lib/common/model/job/job_review_submission.dart

48 lines
1.1 KiB
Dart
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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<JobReviewQuestions> questions;
JobReviewSubmission({
this.commentImageUrl,
required this.score,
required this.paperId,
required this.questions,
});
factory JobReviewSubmission.fromJson(Map<String, dynamic> srcJson) => _$JobReviewSubmissionFromJson(srcJson);
Map<String, dynamic> 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<String, dynamic> srcJson) => _$JobReviewQuestionsFromJson(srcJson);
Map<String, dynamic> toJson() => _$JobReviewQuestionsToJson(this);
}