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

part 'category_response.g.dart';

@JsonSerializable()
class CategoryResponse {

  CategoryResponse();

  factory CategoryResponse.fromJson(Map<String, dynamic> json) =>
      _$CategoryResponseFromJson(json);
  int? id;
  @JsonKey(name: 'parent_id')
  int? parentId;
  String name = '';

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

  @override
  String toString() {
    return jsonEncode(this);
  }
}