48 lines
1.1 KiB
Dart
48 lines
1.1 KiB
Dart
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);
|
||
}
|