Tweaking cusomter list
This commit is contained in:
@@ -5,9 +5,11 @@ class CustomerListDto {
|
||||
final int id;
|
||||
final String name;
|
||||
final String customerNumber;
|
||||
final String? zip;
|
||||
final String? city;
|
||||
final DateTime? lastUpdateDate;
|
||||
|
||||
CustomerListDto({required this.id, required this.name, required this.customerNumber, this.lastUpdateDate});
|
||||
CustomerListDto({required this.id, required this.name, required this.customerNumber, this.zip, this.city, this.lastUpdateDate});
|
||||
|
||||
/// Create from JSON response
|
||||
factory CustomerListDto.fromJson(Map<String, dynamic> json) {
|
||||
@@ -15,6 +17,8 @@ class CustomerListDto {
|
||||
id: json['id'] as int,
|
||||
name: json['name'] as String,
|
||||
customerNumber: json['customerNumber'] as String,
|
||||
zip: json['zip'] as String?,
|
||||
city: json['city'] as String?,
|
||||
lastUpdateDate: DateTimeUtils.toDateTime(json['lastUpdateDate']),
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user