20 lines
473 B
Dart
20 lines
473 B
Dart
import 'package:json_annotation/json_annotation.dart';
|
|
|
|
part 'address.g.dart';
|
|
|
|
@JsonSerializable(fieldRename: FieldRename.snake)
|
|
class AddressDTO {
|
|
AddressDTO(
|
|
{required this.streetName,
|
|
required this.postalCode,
|
|
required this.city});
|
|
|
|
String streetName;
|
|
String postalCode;
|
|
String city;
|
|
|
|
factory AddressDTO.fromJson(Map<String, dynamic> json) =>
|
|
_$AddressDTOFromJson(json);
|
|
|
|
Map<dynamic, dynamic> toJson() => _$AddressDTOToJson(this);
|
|
} |