123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
-
- List<ExtendContent> jsonToList(list){
- List<ExtendContent> contList=[];
- list.forEach((item){
- contList.add(ExtendContent.fromJson(item));
- });
- return contList;
- }
-
-
- class NewsInformationInfoTextModel {
- String? createDate;
- String? newsId;
- num? status;
- String? thumb;
- String? title;
- String? typeId;
- String? typeName;
- num? weight;
- List<ExtendContent>? contentList=[];
-
- NewsInformationInfoTextModel();
-
- NewsInformationInfoTextModel.fromJson(Map<String, dynamic> json)
- : newsId = json["newsId"],
- title = json["title"],
- typeId = json["typeId"],
- typeName = json["typeName"],
- thumb = json["thumb"],
- weight = json["weight"],
- status = json["status"],
- createDate = json["createDate"],
- contentList= jsonToList(json["contentList"]);
-
-
- Map<String, dynamic> toJson() => {
- 'newsId': newsId,
- 'title': title,
- 'typeId': typeId,
- 'typeName': typeName,
- 'thumb': thumb,
- 'weight': weight,
- 'status': status,
- 'createDate': createDate,
-
-
- };
- }
-
- class ExtendContent {
- String? content;
- String? contentType;
- String? createDate;
- String? extId;
- num? sort;
- String? targetId;
- String? targetType;
- ExtendContent();
-
- ExtendContent.fromJson(Map<String, dynamic> json)
- : content = json["content"],
- contentType = json["contentType"],
- createDate = json["createDate"],
- extId = json["extId"],
- sort = json["sort"],
- targetId = json["targetId"],
- targetType = json["targetType;"];
-
- Map<String, dynamic> toJson() => {
- 'content': content,
- 'contentType': contentType,
- 'createDate': createDate,
- 'extId': extId,
- 'sort': sort,
- 'targetId': targetId,
- 'targetType': targetType,
- };
- }
|