Initial draft
This commit is contained in:
35
lib/dto/article.dart
Normal file
35
lib/dto/article.dart
Normal file
@ -0,0 +1,35 @@
|
||||
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<String, dynamic> json) =>
|
||||
_$ArticleDTOFromJson(json);
|
||||
|
||||
Map<dynamic, dynamic> toJson() => _$ArticleDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user