17 lines
394 B
Dart
17 lines
394 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'note.g.dart';
|
|
|
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
|
class NoteDTO {
|
|
NoteDTO(
|
|
{required this.id,
|
|
required this.note});
|
|
|
|
final String id;
|
|
final String note;
|
|
|
|
factory NoteDTO.fromJson(Map<String, dynamic> json) => _$NoteDTOFromJson(json);
|
|
Map<dynamic, dynamic> toJson() => _$NoteDTOToJson(this);
|
|
}
|