import 'package:equatable/equatable.dart';

class Booth extends Equatable {
  int id;
  String name;
  String code;

  Booth({required this.name, required this.id, required this.code});
  Booth.fromJson(Map<String, dynamic> json)
      : id = json['id'].runtimeType == int ? json['id'] : int.parse(json['id']),
        name = json['name'],
        code = json['code'];

  Map<String, dynamic> toJson() => {'name': name, 'id': id, 'code': code};

  @override
  List<Object?> get props => [id];
}
