class MessageListEntity {

  List<MessageListItem> rows;
  int total;
  int size;
  int current;
  String readCount;
	String unreadCount;
  bool searchCount;
  int pages;

	MessageListEntity.fromJsonMap(Map<String, dynamic> map):
				rows = List<MessageListItem>.from(map["records"].map((it) => MessageListItem.fromJsonMap(it))),
		total = map["total"],
		size = map["size"],
		current = map["current"],
		readCount = map["readCount"],
		unreadCount = map["unreadCount"],
		searchCount = map["searchCount"],
		pages = map["pages"];

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['records'] = rows != null ?
			this.rows.map((v) => v.toJson()).toList()
			: null;
		data['total'] = total;
		data['size'] = size;
		data['current'] = current;
		data['readCount'] = readCount;
		data['unreadCount'] = unreadCount;
		data['searchCount'] = searchCount;
		data['pages'] = pages;
		return data;
	}
}



class MessageListItem {

	String id;
	String userId;
	String content;
	int type;
	int viewFlag;
	int deviceModel;
	String createUserId;
	String createTime;

	MessageListItem({
		this.id=""
});

	MessageListItem.fromJsonMap(Map<String, dynamic> map):
				id = map["id"],
				userId = map["userId"],
				content = map["content"],
				type = map["type"],
				viewFlag = map["viewFlag"],
				deviceModel = map["deviceModel"],
				createUserId = map["createUserId"],
				createTime = map["createTime"];

	Map<String, dynamic> toJson() {
		final Map<String, dynamic> data = new Map<String, dynamic>();
		data['id'] = id;
		data['userId'] = userId;
		data['content'] = content;
		data['type'] = type;
		data['viewFlag'] = viewFlag;
		data['deviceModel'] = deviceModel;
		data['createUserId'] = createUserId;
		data['createTime'] = createTime;
		return data;
	}
}
