forked from CarGuo/gsy_github_app_flutter
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCommitFile.dart
More file actions
43 lines (37 loc) · 819 Bytes
/
CommitFile.dart
File metadata and controls
43 lines (37 loc) · 819 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
40
41
42
43
import 'package:json_annotation/json_annotation.dart';
/**
* Created by guoshuyu
* Date: 2018-07-31
*/
part 'CommitFile.g.dart';
@JsonSerializable()
class CommitFile {
String sha;
@JsonKey(name: "filename")
String fileName;
String status;
int additions;
int deletions;
int changes;
@JsonKey(name: "blob_url")
String blobUrl;
@JsonKey(name: "raw_url")
String rawUrl;
@JsonKey(name: "contents_url")
String contentsUrl;
String patch;
CommitFile(
this.sha,
this.fileName,
this.status,
this.additions,
this.deletions,
this.changes,
this.blobUrl,
this.rawUrl,
this.contentsUrl,
this.patch,
);
factory CommitFile.fromJson(Map<String, dynamic> json) => _$CommitFileFromJson(json);
Map<String, dynamic> toJson() => _$CommitFileToJson(this);
}