import 'package:hello_wallpaper/generated/json/base/json_convert_content.dart';
import 'package:hello_wallpaper/models/base_resp_model.dart';

BaseRespModel $BaseRespModelFromJson(Map<String, dynamic> json) {
  final BaseRespModel baseRespModel = BaseRespModel();
  final int? code = jsonConvert.convert<int>(json['code']);
  if (code != null) {
    baseRespModel.code = code;
  }
  final String? message = jsonConvert.convert<String>(json['message']);
  if (message != null) {
    baseRespModel.message = message;
  }
  final dynamic data = json['data'];
  if (data != null) {
    baseRespModel.data = data;
  }
  return baseRespModel;
}

Map<String, dynamic> $BaseRespModelToJson(BaseRespModel entity) {
  final Map<String, dynamic> data = <String, dynamic>{};
  data['code'] = entity.code;
  data['message'] = entity.message;
  data['data'] = entity.data;
  return data;
}

extension BaseRespModelExtension on BaseRespModel {
  BaseRespModel copyWith({
    int? code,
    String? message,
    dynamic data,
  }) {
    return BaseRespModel()
      ..code = code ?? this.code
      ..message = message ?? this.message
      ..data = data ?? this.data;
  }
}