import 'package:json_annotation/json_annotation.dart'; part 'article.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class ArticleDTO { ArticleDTO({ required this.name, required this.articleNr, required this.quantity, required this.price, required this.scannable, required this.internalId, required this.scannedRemovedAmount, required this.scannedAmount, required this.removeNoteId, required this.taxRate, }); String name; String articleNr; String quantity; String price; String taxRate; String internalId; String scannedAmount; String scannedRemovedAmount; String? removeNoteId; bool scannable; factory ArticleDTO.fromJson(Map json) => _$ArticleDTOFromJson(json); Map toJson() => _$ArticleDTOToJson(this); }