D1APP-48 data model edits
This commit is contained in:
parent
b51f0b3d93
commit
58fd0680fe
|
|
@ -5,9 +5,9 @@ class NewsOverview {
|
||||||
final String description;
|
final String description;
|
||||||
final String image;
|
final String image;
|
||||||
final String createdAt;
|
final String createdAt;
|
||||||
final bool marked;
|
bool marked;
|
||||||
|
|
||||||
const NewsOverview({
|
NewsOverview({
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.title,
|
required this.title,
|
||||||
required this.reference,
|
required this.reference,
|
||||||
|
|
|
||||||
|
|
@ -8,10 +8,11 @@ class RadarOverview {
|
||||||
final int timeToRead;
|
final int timeToRead;
|
||||||
final String createdAt;
|
final String createdAt;
|
||||||
final bool forManagers;
|
final bool forManagers;
|
||||||
final bool marked;
|
bool marked;
|
||||||
final List<Category> categories;
|
final List<Category> categories;
|
||||||
|
final int comments;
|
||||||
|
|
||||||
const RadarOverview({
|
RadarOverview({
|
||||||
required this.id,
|
required this.id,
|
||||||
required this.image,
|
required this.image,
|
||||||
required this.title,
|
required this.title,
|
||||||
|
|
@ -21,6 +22,7 @@ class RadarOverview {
|
||||||
required this.forManagers,
|
required this.forManagers,
|
||||||
required this.marked,
|
required this.marked,
|
||||||
required this.categories,
|
required this.categories,
|
||||||
|
required this.comments,
|
||||||
});
|
});
|
||||||
|
|
||||||
factory RadarOverview.fromJson(Map<String, dynamic> json) => RadarOverview(
|
factory RadarOverview.fromJson(Map<String, dynamic> json) => RadarOverview(
|
||||||
|
|
@ -32,6 +34,7 @@ class RadarOverview {
|
||||||
createdAt: json['createdAt'],
|
createdAt: json['createdAt'],
|
||||||
forManagers: json['forManagers'],
|
forManagers: json['forManagers'],
|
||||||
marked: json['marked'],
|
marked: json['marked'],
|
||||||
|
comments: json['comments'],
|
||||||
categories: List<Category>.from(
|
categories: List<Category>.from(
|
||||||
json['categories'].map(
|
json['categories'].map(
|
||||||
(category) => Category.fromJson(category),
|
(category) => Category.fromJson(category),
|
||||||
|
|
@ -48,6 +51,7 @@ class RadarOverview {
|
||||||
'createdAt': createdAt,
|
'createdAt': createdAt,
|
||||||
'forManagers': forManagers,
|
'forManagers': forManagers,
|
||||||
'marked': marked,
|
'marked': marked,
|
||||||
|
'comment': comments,
|
||||||
'categories': categories.map((e) => e.toJson()).toList(),
|
'categories': categories.map((e) => e.toJson()).toList(),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue