import 'package:json_annotation/json_annotation.dart';

import 'area_sub_category.dart';

part '../../../_generated/data/remote/models/area_category.g.dart';

@JsonSerializable(fieldRename: FieldRename.snake)
class AreaCategory {
  final int id;
  final String name;
  final List<AreaSubCategory> subCategories;

  AreaCategory({
    required this.id,
    required this.name,
    required this.subCategories,
  });

  factory AreaCategory.fromJson(Map<String, dynamic> json) =>
      _$AreaCategoryFromJson(json);

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