import 'package:json_annotation/json_annotation.dart';
import 'package:shared_preferences/shared_preferences.dart';

part 'get_product_list_req_model.g.dart';

@JsonSerializable()
class GetProductListReqModel {
  @JsonKey(name: "search_name")
  final String search;
  final String sort;
  final String sort_key;
  final int limit;
  final int page;
  @JsonKey(name: 'intellectual_type')
  final String? intellectualType;
  final String? category;
  @JsonKey(name: 'price_from')
  final String? priceFrom;
  @JsonKey(name: 'price_to')
  final String? priceTo;
  String type;
  String lang;

  GetProductListReqModel({
    this.search = '',
    this.sort = '',
    this.sort_key = '',
    this.limit = 20,
    this.page = 1,
    this.intellectualType,
    this.category,
    this.priceFrom = "0",
    this.priceTo = "99999999",
    this.type = '',
    this.lang = '',
  });

  Map<String, dynamic> toJson() => _$GetProductListReqModelToJson(this);
}
