/// id : 4
/// parent_id : 0
/// name : ""
/// updated_at : "2021-01-06 14:20:47"

class CategoryResponse {
  int? id;
  int? parentId;
  String name = '';
  String? updatedAt;

  static CategoryResponse? fromMap(dynamic map) {
    if (map == null) return null;
    final CategoryResponse categoryResponseBean = CategoryResponse();
    categoryResponseBean.id = map['id'] as int;
    categoryResponseBean.parentId = map['parent_id'] as int;
    categoryResponseBean.name = map['name'] as String;
    categoryResponseBean.updatedAt = map['updated_at']  as String;
    return categoryResponseBean;
  }

  Map toJson() => {
    'id': id,
    'parent_id': parentId,
    'name': name,
    'updated_at': updatedAt,
  };
}