activity_banner_model.dart 990 B

123456789101112131415161718192021222324252627282930313233343536
  1. class ActivityBannerModel {
  2. String? contentId;
  3. String? title;
  4. String? type; //点击banner跳转 activity->富文本+视频. ,article->富文本 column->专题
  5. String? image;
  6. String? contentType; //article video
  7. String? sourceId;
  8. ActivityBannerModel({
  9. this.contentId,
  10. this.title,
  11. this.type,
  12. this.image,
  13. this.contentType,
  14. this.sourceId,
  15. });
  16. ActivityBannerModel.fromJson(Map<String, dynamic> json) {
  17. contentId = json['contentId']?.toString();
  18. title = json['title']?.toString();
  19. type = json['type']?.toString();
  20. image = json['image']?.toString();
  21. contentType = json['contentType']?.toString();
  22. sourceId = json['sourceId']?.toString();
  23. }
  24. Map<String, dynamic> toJson() {
  25. final data = <String, dynamic>{};
  26. data['contentId'] = contentId;
  27. data['title'] = title;
  28. data['type'] = type;
  29. data['image'] = image;
  30. data['contentType'] = contentType;
  31. data['sourceId'] = sourceId;
  32. return data;
  33. }
  34. }