import 'package:eatvio_app/features/payment/models/promo_code_model.dart'; import 'package:freezed_annotation/freezed_annotation.dart'; part 'promo_apply_response.freezed.dart'; part 'promo_apply_response.g.dart'; @freezed abstract class PromoApplyResponse with _$PromoApplyResponse { const factory PromoApplyResponse({ required bool success, String? error, @JsonKey(name: 'promo_code') PromoCodeModel? promoCode, @JsonKey(name: 'discount_percent') int? discountPercent, @JsonKey(name: 'discount_amount_rub') double? discountAmountRub, @JsonKey(name: 'original_amount_rub') double? originalAmountRub, @JsonKey(name: 'final_amount_rub') double? finalAmountRub, }) = _PromoApplyResponse; factory PromoApplyResponse.fromJson(Map json) => _$PromoApplyResponseFromJson(json); }