import 'address.dart';
import 'package:json_annotation/json_annotation.dart';

part 'customer.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class CustomerDTO {
  CustomerDTO({required this.name, required this.address, this.eMail});

  String name;
  AddressDTO address;
  String? eMail;

  factory CustomerDTO.fromJson(Map<String, dynamic> json) => _$CustomerDTOFromJson(json);
  Map<dynamic, dynamic> toJson() => _$CustomerDTOToJson(this);
}