Added components to article
This commit is contained in:
23
lib/dto/component.dart
Normal file
23
lib/dto/component.dart
Normal file
@ -0,0 +1,23 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'component.g.dart';
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class ComponentDTO {
|
||||
ComponentDTO({
|
||||
required this.articleNr,
|
||||
required this.name,
|
||||
required this.quantity,
|
||||
required this.pos,
|
||||
});
|
||||
|
||||
String articleNr;
|
||||
String name;
|
||||
String quantity;
|
||||
String pos;
|
||||
|
||||
factory ComponentDTO.fromJson(Map<String, dynamic> json) =>
|
||||
_$ComponentDTOFromJson(json);
|
||||
|
||||
Map<dynamic, dynamic> toJson() => _$ComponentDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user