import 'article.dart'; import 'package:json_annotation/json_annotation.dart'; part 'discount.g.dart'; @JsonSerializable(fieldRename: FieldRename.snake) class DiscountDTO { DiscountDTO({required this.note, required this.noteId, required this.article}); String? note; String? noteId; ArticleDTO article; factory DiscountDTO.fromJson(Map json) => _$DiscountDTOFromJson(json); Map toJson() => _$DiscountDTOToJson(this); }