| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142 |
- import 'package:bbyyy/generated/json/base/json_convert_content.dart';
- import 'package:bbyyy/beans/ad_bean_entity.dart';
- AdBeanEntity $AdBeanEntityFromJson(Map<String, dynamic> json) {
- AdBeanEntity adBeanEntity = AdBeanEntity();
- var data = jsonConvert.convert<AdBeanData>(json['data']);
- if (data != null) {
- adBeanEntity.data = data;
- }
- var error = jsonConvert.convert<String>(json['error']);
- if (error != null) {
- adBeanEntity.error = error;
- }
- return adBeanEntity;
- }
- Map<String, dynamic> $AdBeanEntityToJson(AdBeanEntity entity) {
- final Map<String, dynamic> data = <String, dynamic>{};
- data['data'] = entity.data.toJson();
- data['error'] = entity.error;
- return data;
- }
- AdBeanData $AdBeanDataFromJson(Map<String, dynamic> json) {
- AdBeanData adBeanData = AdBeanData();
- var total = jsonConvert.convert<int>(json['total']);
- if (total != null) {
- adBeanData.total = total;
- }
- var data = jsonConvert.convertListNotNull<AdBeanDataData>(json['data']);
- if (data != null) {
- adBeanData.data = data;
- }
- return adBeanData;
- }
- Map<String, dynamic> $AdBeanDataToJson(AdBeanData entity) {
- final Map<String, dynamic> data = <String, dynamic>{};
- data['total'] = entity.total;
- data['data'] = entity.data.map((v) => v.toJson()).toList();
- return data;
- }
- AdBeanDataData $AdBeanDataDataFromJson(Map<String, dynamic> json) {
- AdBeanDataData adBeanDataData = AdBeanDataData();
- var id = jsonConvert.convert<int>(json['id']);
- if (id != null) {
- adBeanDataData.id = id;
- }
- var description = jsonConvert.convert<String>(json['description']);
- if (description != null) {
- adBeanDataData.description = description;
- }
- var linkId = jsonConvert.convert<int>(json['link_id']);
- if (linkId != null) {
- adBeanDataData.linkId = linkId;
- }
- var type = jsonConvert.convert<int>(json['type']);
- if (type != null) {
- adBeanDataData.type = type;
- }
- var createTime = jsonConvert.convert<String>(json['create_time']);
- if (createTime != null) {
- adBeanDataData.createTime = createTime;
- }
- var days = jsonConvert.convert<int>(json['days']);
- if (days != null) {
- adBeanDataData.days = days;
- }
- var userPic = jsonConvert.convert<String>(json['user_pic']);
- if (userPic != null) {
- adBeanDataData.userPic = userPic;
- }
- var userName = jsonConvert.convert<String>(json['user_name']);
- if (userName != null) {
- adBeanDataData.userName = userName;
- }
- var title = jsonConvert.convert<String>(json['title']);
- if (title != null) {
- adBeanDataData.title = title;
- }
- var linkType = jsonConvert.convert<int>(json['link_type']);
- if (linkType != null) {
- adBeanDataData.linkType = linkType;
- }
- var startDate = jsonConvert.convert<String>(json['start_date']);
- if (startDate != null) {
- adBeanDataData.startDate = startDate;
- }
- var userUid = jsonConvert.convert<int>(json['user_uid']);
- if (userUid != null) {
- adBeanDataData.userUid = userUid;
- }
- var coverPath = jsonConvert.convert<String>(json['cover_path']);
- if (coverPath != null) {
- adBeanDataData.coverPath = coverPath;
- }
- var pictures = jsonConvert.convert<String>(json['pictures']);
- if (pictures != null) {
- adBeanDataData.pictures = pictures;
- }
- var renewed = jsonConvert.convert<bool>(json['renewed']);
- if (renewed != null) {
- adBeanDataData.renewed = renewed;
- }
- var mobile = jsonConvert.convert<String>(json['mobile']);
- if (mobile != null) {
- adBeanDataData.mobile = mobile;
- }
- var onShow = jsonConvert.convert<bool>(json['on_show']);
- if (onShow != null) {
- adBeanDataData.onShow = onShow;
- }
- var paid = jsonConvert.convert<bool>(json['paid']);
- if (paid != null) {
- adBeanDataData.paid = paid;
- }
- return adBeanDataData;
- }
- Map<String, dynamic> $AdBeanDataDataToJson(AdBeanDataData entity) {
- final Map<String, dynamic> data = <String, dynamic>{};
- data['id'] = entity.id;
- data['description'] = entity.description;
- data['link_id'] = entity.linkId;
- data['type'] = entity.type;
- data['create_time'] = entity.createTime;
- data['days'] = entity.days;
- data['user_pic'] = entity.userPic;
- data['user_name'] = entity.userName;
- data['title'] = entity.title;
- data['link_type'] = entity.linkType;
- data['start_date'] = entity.startDate;
- data['user_uid'] = entity.userUid;
- data['cover_path'] = entity.coverPath;
- data['pictures'] = entity.pictures;
- data['renewed'] = entity.renewed;
- data['mobile'] = entity.mobile;
- data['on_show'] = entity.onShow;
- data['paid'] = entity.paid;
- return data;
- }
|