import 'package:hl_lieferservice/dto/customer.dart';

import 'address.dart';

class Customer {
  const Customer({required this.name, required this.address, this.email});

  final String name;
  final Address address;
  final String? email;

  factory Customer.fromDTO(CustomerDTO dto) {
    return Customer(
      name: dto.name,
      address: Address.fromDTO(dto.address),
      email: dto.eMail,
    );
  }
}
