class CategoriesModel {
  String? id;
  String? createdAt;
  String? updatedAt;
  String? state;
  String? name;
  int? count;
  String? description;
  String? createdBy;
  String? parentId;
  String? icon;
  String? url;

  CategoriesModel(
      {this.id,
      this.createdAt,
      this.updatedAt,
      this.state,
      this.name,
      this.count,
      this.description,
      this.createdBy,
      this.parentId,
      this.icon,
      this.url});

  CategoriesModel.fromJson(Map<String, dynamic> json) {
    id = json['id'];
    createdAt = json['createdAt'];
    updatedAt = json['updatedAt'];
    state = json['state'];
    name = json['name'];
    count = json['count'];
    description = json['description'];
    createdBy = json['created_by'];
    parentId = json['parent_id'];
    icon = json['icon'];
    url = json['url'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['id'] = id;
    data['createdAt'] = createdAt;
    data['updatedAt'] = updatedAt;
    data['state'] = state;
    data['name'] = name;
    data['count'] = count;
    data['description'] = description;
    data['created_by'] = createdBy;
    data['parent_id'] = parentId;
    data['icon'] = icon;
    data['url'] = url;
    return data;
  }
}
