forked from lxm_flutter/FlutterUnit
point
This commit is contained in:
36
lib/model/github/IssueComment.dart
Normal file
36
lib/model/github/IssueComment.dart
Normal file
@@ -0,0 +1,36 @@
|
||||
import 'package:flutter_unit/model/github/github_user.dart';
|
||||
|
||||
part 'g/IssueComment.g.dart';
|
||||
|
||||
|
||||
class IssueComment{
|
||||
int id;
|
||||
GithubUser user;
|
||||
|
||||
DateTime createdAt;
|
||||
|
||||
DateTime updatedAt;
|
||||
|
||||
String authorAssociation;
|
||||
String body;
|
||||
|
||||
String bodyHtml;
|
||||
String type;
|
||||
String htmlUrl;
|
||||
|
||||
IssueComment(
|
||||
this.id,
|
||||
this.user,
|
||||
this.createdAt,
|
||||
this.updatedAt,
|
||||
this.authorAssociation,
|
||||
this.body,
|
||||
this.bodyHtml,
|
||||
this.type,
|
||||
this.htmlUrl,
|
||||
);
|
||||
|
||||
factory IssueComment.fromJson(Map<String, dynamic> json) => _$IssueEventFromJson(json);
|
||||
|
||||
Map<String, dynamic> toJson() => _$IssueEventToJson(this);
|
||||
}
|
||||
40
lib/model/github/g/IssueComment.g.dart
Normal file
40
lib/model/github/g/IssueComment.g.dart
Normal file
@@ -0,0 +1,40 @@
|
||||
// GENERATED CODE - DO NOT MODIFY BY HAND
|
||||
|
||||
part of '../IssueComment.dart';
|
||||
|
||||
// **************************************************************************
|
||||
// JsonSerializableGenerator
|
||||
// **************************************************************************
|
||||
|
||||
IssueComment _$IssueEventFromJson(Map<String, dynamic> json) {
|
||||
return IssueComment(
|
||||
json['id'] as int,
|
||||
json['user'] == null
|
||||
? null
|
||||
: GithubUser.fromJson(json['user'] as Map<String, dynamic>),
|
||||
json['created_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['created_at'] as String),
|
||||
json['updated_at'] == null
|
||||
? null
|
||||
: DateTime.parse(json['updated_at'] as String),
|
||||
json['author_association'] as String,
|
||||
json['body'] as String,
|
||||
json['body_html'] as String,
|
||||
json['event'] as String,
|
||||
json['html_url'] as String,
|
||||
);
|
||||
}
|
||||
|
||||
Map<String, dynamic> _$IssueEventToJson(IssueComment instance) =>
|
||||
<String, dynamic>{
|
||||
'id': instance.id,
|
||||
'user': instance.user,
|
||||
'created_at': instance.createdAt?.toIso8601String(),
|
||||
'updated_at': instance.updatedAt?.toIso8601String(),
|
||||
'author_association': instance.authorAssociation,
|
||||
'body': instance.body,
|
||||
'body_html': instance.bodyHtml,
|
||||
'event': instance.type,
|
||||
'html_url': instance.htmlUrl,
|
||||
};
|
||||
Reference in New Issue
Block a user