class Profession {
  final String name;

  Profession({required this.name});

  Map<String, Object?> toDocument() {
    return {
      'name': name,
    };
  }

  static Profession fromDocument(Map<String, dynamic> doc) {
    return Profession(
      name: doc['name'] as String,
    );
  }

  @override
  String toString() {
    return 'Profession{name: $name}';
  }
}
