class Market {
  String id;
  String name;

  Market({
    this.id,
    this.name,
  });

  Map<String, dynamic> toMap() {
    return {
      'id': id,
      'name': name,
    };
  }

  factory Market.fromMap(Map<String, dynamic> map, String id) {
    return Market(
      id: id,
      name: map['name'],
    );
  }

  @override
  String toString() {
    return 'Market{id: $id, name: $name}';
  }
}
