19 lines
360 B
Dart
19 lines
360 B
Dart
class Note {
|
|
final int postId;
|
|
final String content;
|
|
|
|
Note({required this.postId, required this.content});
|
|
|
|
factory Note.fromJson(Map<String, dynamic> json) {
|
|
return Note(
|
|
postId: json['postId'],
|
|
content: json['content'],
|
|
);
|
|
}
|
|
|
|
Map<String, dynamic> toJson() => {
|
|
'postId': postId,
|
|
'content': content,
|
|
};
|
|
}
|