base_model_entity.g.dart 882 B

123456789101112131415161718192021222324252627
  1. import 'package:fuwei/generated/json/base/json_convert_content.dart';
  2. import 'package:fuwei/data/base_model_entity.dart';
  3. BaseModelEntity<T> $BaseModelEntityFromJson<T>(Map<String, dynamic> json) {
  4. final BaseModelEntity<T> baseModelEntity = BaseModelEntity<T>();
  5. final int? code = jsonConvert.convert<int>(json['code']);
  6. if (code != null) {
  7. baseModelEntity.code = code;
  8. }
  9. final String? msg = jsonConvert.convert<String>(json['msg']);
  10. if (msg != null) {
  11. baseModelEntity.msg = msg;
  12. }
  13. final T? data = JsonConvert.fromJsonAsT(json['data']);
  14. if (data != null) {
  15. baseModelEntity.data = data;
  16. }
  17. return baseModelEntity;
  18. }
  19. Map<String, dynamic> $BaseModelEntityToJson(BaseModelEntity entity) {
  20. final Map<String, dynamic> data = <String, dynamic>{};
  21. data['code'] = entity.code;
  22. data['msg'] = entity.msg;
  23. data['data'] = entity.data;
  24. return data;
  25. }