forked from CarGuo/gsy_github_app_flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathRepoCommit.dart
More file actions
39 lines (33 loc) · 839 Bytes
/
RepoCommit.dart
File metadata and controls
39 lines (33 loc) · 839 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
import 'package:gsy_github_app_flutter/common/model/CommitGitInfo.dart';
import 'package:gsy_github_app_flutter/common/model/User.dart';
import 'package:json_annotation/json_annotation.dart';
/**
* Created by guoshuyu
* Date: 2018-07-31
*/
part 'RepoCommit.g.dart';
@JsonSerializable()
class RepoCommit {
String sha;
String url;
@JsonKey(name: "html_url")
String htmlUrl;
@JsonKey(name: "comments_url")
String commentsUrl;
CommitGitInfo commit;
User author;
User committer;
List<RepoCommit> parents;
RepoCommit(
this.sha,
this.url,
this.htmlUrl,
this.commentsUrl,
this.commit,
this.author,
this.committer,
this.parents,
);
factory RepoCommit.fromJson(Map<String, dynamic> json) => _$RepoCommitFromJson(json);
Map<String, dynamic> toJson() => _$RepoCommitToJson(this);
}