import 'package:domain/generated/json/base/json_convert_content.dart';
import 'package:domain/entity/myfollowing_list_entity.dart';

MyfollowingListEntity $MyfollowingListEntityFromJson(Map<String, dynamic> json) {
  final MyfollowingListEntity myfollowingListEntity = MyfollowingListEntity();
  final int? id = jsonConvert.convert<int>(json['id']);
  if (id != null) {
    myfollowingListEntity.id = id;
  }
  final String? name = jsonConvert.convert<String>(json['name']);
  if (name != null) {
    myfollowingListEntity.name = name;
  }
  final String? avatar = jsonConvert.convert<String>(json['avatar']);
  if (avatar != null) {
    myfollowingListEntity.avatar = avatar;
  }
  return myfollowingListEntity;
}

Map<String, dynamic> $MyfollowingListEntityToJson(MyfollowingListEntity entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['id'] = entity.id;
  data['name'] = entity.name;
  data['avatar'] = entity.avatar;
  return data;
}

extension MyfollowingListEntityExtension on MyfollowingListEntity {
  MyfollowingListEntity copyWith({
    int? id,
    String? name,
    String? avatar,
  }) {
    return MyfollowingListEntity()
      ..id = id ?? this.id
      ..name = name ?? this.name
      ..avatar = avatar ?? this.avatar;
  }
}