descuento_model.dart 359 B

123456789101112131415161718192021
  1. class Descuento {
  2. int? id;
  3. int porcentaje;
  4. Descuento({this.id, required this.porcentaje});
  5. factory Descuento.fromJson(Map<String, dynamic> json) {
  6. return Descuento(
  7. id: json['id'],
  8. porcentaje: json['porcentaje'],
  9. );
  10. }
  11. Map<String, dynamic> toJson() {
  12. return {
  13. 'id': id,
  14. 'porcentaje': porcentaje,
  15. };
  16. }
  17. }