import 'package:flutter/foundation.dart';

@immutable
class MobilityModel {
  const MobilityModel({
    required this.hasACar,
    required this.canRelocate,
  });

  factory MobilityModel.fromJson(Map<String, dynamic> json) {
    return MobilityModel(
      hasACar: json['has_car'] as bool? ?? false,
      canRelocate: json['can_relocate'] as bool? ?? false,
    );
  }

  final bool hasACar;
  final bool canRelocate;

  Map<String, dynamic> toJson() {
    return {
      'has_car': hasACar,
      'can_relocate': canRelocate,
    };
  }
}
