event_push_request.dart 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. import 'package:clean/base/base_request.dart';
  2. import 'package:json_annotation/json_annotation.dart';
  3. part 'event_push_request.g.dart';
  4. @JsonSerializable()
  5. class EventPushRequest {
  6. @JsonKey(name: 'ak')
  7. late String ak;
  8. @JsonKey(name: 'cp')
  9. late Map<String, dynamic> cp;
  10. @JsonKey(name: 'es')
  11. List<Map<String, dynamic>> es;
  12. @JsonKey(name: 'pr')
  13. Map<String, dynamic>? pr;
  14. @JsonKey(name: 'ft')
  15. late int ft;
  16. EventPushRequest(this.ft, this.es, Map<String, dynamic>? pr) {
  17. ak = "4808237ea7d1462a8de80c8ce7ae5c06";
  18. cp = <String, dynamic>{};
  19. cp["\$pkg"] = BaseRequest().packageName;
  20. cp["\$aplf"] = BaseRequest().appPlatform;
  21. cp["\$chnl"] = BaseRequest().channelName;
  22. cp["\$aver"] = BaseRequest().appVersionName;
  23. cp["\$avec"] = BaseRequest().appVersionCode;
  24. cp["\$Idfa"] = BaseRequest().idfa;
  25. cp["\$idfv"] = BaseRequest().idfv;
  26. cp["\$tplf"] = BaseRequest().tgPlatform;
  27. cp["\$osv"] = BaseRequest().tgPlatform;
  28. cp["\$modl"] = BaseRequest().model;
  29. cp["\$brnd"] = BaseRequest().brand;
  30. }
  31. @override
  32. Map<String, dynamic> toJson() => _$EventPushRequestToJson(this);
  33. }