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);
}
