class SearchModel {
  int? categoryId;
  int? cityId;
  int? page;
  String? searchWords;
  String? cityName;
  String? categoryName;

  SearchModel({this.categoryId, this.cityId, this.searchWords, this.page});
  factory SearchModel.zero() => SearchModel();
  Map<String, dynamic> toJson() {
    Map<String, dynamic> data = {
      if (page != null) 'page': page,
      if (searchWords != null) 'name': searchWords,
      if (categoryId != null) 'category_id': categoryId,
      if (cityId != null) 'city_id': cityId,
    };

    return data;
  }
}
