Blame view

lib/generated/json/popup_entity.g.dart 1.87 KB
99b94d6c   吴启风   feat:首页增加信息弹窗
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
  import 'package:wow_english/generated/json/base/json_convert_content.dart';
  import 'package:wow_english/models/popup_entity.dart';
  
  PopupEntity $PopupEntityFromJson(Map<String, dynamic> json) {
    final PopupEntity popupEntity = PopupEntity();
    final String? actionType = jsonConvert.convert<String>(json['actionType']);
    if (actionType != null) {
      popupEntity.actionType = actionType;
    }
    final String? actionValue = jsonConvert.convert<String>(json['actionValue']);
    if (actionValue != null) {
      popupEntity.actionValue = actionValue;
    }
    final int? dayNum = jsonConvert.convert<int>(json['dayNum']);
    if (dayNum != null) {
      popupEntity.dayNum = dayNum;
    }
    final String? id = jsonConvert.convert<String>(json['id']);
    if (id != null) {
      popupEntity.id = id;
    }
0963e27a   吴启风   feat:图片字段修正
22
23
24
    final String? imageUrl = jsonConvert.convert<String>(json['imageUrl']);
    if (imageUrl != null) {
      popupEntity.imageUrl = imageUrl;
99b94d6c   吴启风   feat:首页增加信息弹窗
25
26
27
28
29
30
31
32
33
34
35
36
37
38
    }
    final int? status = jsonConvert.convert<int>(json['status']);
    if (status != null) {
      popupEntity.status = status;
    }
    return popupEntity;
  }
  
  Map<String, dynamic> $PopupEntityToJson(PopupEntity entity) {
    final Map<String, dynamic> data = <String, dynamic>{};
    data['actionType'] = entity.actionType;
    data['actionValue'] = entity.actionValue;
    data['dayNum'] = entity.dayNum;
    data['id'] = entity.id;
0963e27a   吴启风   feat:图片字段修正
39
    data['imageUrl'] = entity.imageUrl;
99b94d6c   吴启风   feat:首页增加信息弹窗
40
41
42
43
44
45
46
47
48
49
    data['status'] = entity.status;
    return data;
  }
  
  extension PopupEntityExtension on PopupEntity {
    PopupEntity copyWith({
      String? actionType,
      String? actionValue,
      int? dayNum,
      String? id,
0963e27a   吴启风   feat:图片字段修正
50
      String? imageUrl,
99b94d6c   吴启风   feat:首页增加信息弹窗
51
52
53
54
55
56
57
      int? status,
    }) {
      return PopupEntity()
        ..actionType = actionType ?? this.actionType
        ..actionValue = actionValue ?? this.actionValue
        ..dayNum = dayNum ?? this.dayNum
        ..id = id ?? this.id
0963e27a   吴启风   feat:图片字段修正
58
        ..imageUrl = imageUrl ?? this.imageUrl
99b94d6c   吴启风   feat:首页增加信息弹窗
59
60
61
        ..status = status ?? this.status;
    }
  }