You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

81 lines
2.2 KiB

import 'dart:convert';
import 'package:huixiang/retrofit/data/author.dart';
class Article {
String? id;
String? createTime;
dynamic? createUser;
String? updateTime;
dynamic? updateUser;
String? storeId;
String? mainTitle;
dynamic? viceTitle;
String? content;
String? coverImg;
Author? author;
int? type;
String? startTime;
String? endTime;
int? state;
int? isDelete;
int? likes;
bool? isHot;
bool? liked;
int? viewers;
dynamic? storeName;
Article();
Article.fromJson(dynamic json) {
this.id = json["id"];
this.createTime = json["createTime"];
this.createUser = json["createUser"];
this.updateTime = json["updateTime"];
this.updateUser = json["updateUser"];
this.storeId = json["storeId"];
this.mainTitle = json["mainTitle"];
this.viceTitle = json["viceTitle"];
this.content = json["content"];
this.coverImg = json["coverImg"];
this.author = json["author"] == null ? null : Author.fromJson(jsonDecode(json["author"]));
this.type = json["type"];
this.startTime = json["startTime"];
this.endTime = json["endTime"];
this.state = json["state"];
this.isDelete = json["isDelete"];
this.likes = json["likes"];
this.isHot = json["isHot"];
this.liked = json["liked"];
this.viewers = json["viewers"];
this.storeName = json["storeName"];
}
Map<String, dynamic> toJson() {
var map = <String, dynamic>{};
map["id"] = this.id;
map["createTime"] = this.createTime;
map["createUser"] = this.createUser;
map["updateTime"] = this.updateTime;
map["updateUser"] = this.updateUser;
map["storeId"] = this.storeId;
map["mainTitle"] = this.mainTitle;
map["viceTitle"] = this.viceTitle;
map["content"] = this.content;
map["coverImg"] = this.coverImg;
map["author"] = this.author?.toJson();
map["type"] = this.type;
map["startTime"] = this.startTime;
map["endTime"] = this.endTime;
map["state"] = this.state;
map["isDelete"] = this.isDelete;
map["likes"] = this.likes;
map["isHot"] = this.isHot;
map["liked"] = this.liked;
map["viewers"] = this.viewers;
map["storeName"] = this.storeName;
return map;
}
}