import 'package:json_annotation/json_annotation.dart'; part 'discount_update.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class DiscountUpdateDTO { DiscountUpdateDTO( {required this.note, required this.deliveryId, required this.discount}); String? note; String deliveryId; int? discount; factory DiscountUpdateDTO.fromJson(Map json) => _$DiscountUpdateDTOFromJson(json); Map toJson() => _$DiscountUpdateDTOToJson(this); }