Initial draft
This commit is contained in:
18
lib/dto/discount_add.dart
Normal file
18
lib/dto/discount_add.dart
Normal file
@ -0,0 +1,18 @@
|
||||
import 'package:json_annotation/json_annotation.dart';
|
||||
|
||||
part 'discount_add.g.dart';
|
||||
|
||||
@JsonSerializable(fieldRename: FieldRename.snake)
|
||||
class DiscountAddDTO {
|
||||
DiscountAddDTO(
|
||||
{required this.note, required this.deliveryId, required this.discount});
|
||||
|
||||
String note;
|
||||
String deliveryId;
|
||||
int discount;
|
||||
|
||||
factory DiscountAddDTO.fromJson(Map<String, dynamic> json) =>
|
||||
_$DiscountAddDTOFromJson(json);
|
||||
|
||||
Map<dynamic, dynamic> toJson() => _$DiscountAddDTOToJson(this);
|
||||
}
|
||||
Reference in New Issue
Block a user