41 lines
970 B
Dart
41 lines
970 B
Dart
class NewsOverviewData {
|
|
final int id;
|
|
final String title;
|
|
final String reference;
|
|
final String description;
|
|
final String image;
|
|
final String createdAt;
|
|
bool marked;
|
|
|
|
NewsOverviewData({
|
|
required this.id,
|
|
required this.title,
|
|
required this.reference,
|
|
required this.description,
|
|
required this.image,
|
|
required this.createdAt,
|
|
required this.marked,
|
|
});
|
|
|
|
factory NewsOverviewData.fromJson(Map<String, dynamic> json) =>
|
|
NewsOverviewData(
|
|
id: json['id'],
|
|
title: json['title'],
|
|
reference: json['reference'],
|
|
description: json['description'],
|
|
image: json['image'],
|
|
createdAt: json['createdAt'],
|
|
marked: json['marked'],
|
|
);
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'id': id,
|
|
'title': title,
|
|
'reference': reference,
|
|
'description': description,
|
|
'image': image,
|
|
'createdAt': createdAt,
|
|
'marked': marked,
|
|
};
|
|
}
|