class LikePageEntity {
  int error;
  String message;
  Null extra;
  bool noData;
  List<Data> data;

  LikePageEntity(
      {this.error, this.message, this.extra, this.noData, this.data});

  LikePageEntity.fromJson(Map<String, dynamic> json) {
    error = json['error'];
    message = json['message'];
    extra = json['extra'];
    noData = json['noData'];
    if (json['data'] != null) {
      data = new List<Data>();
      json['data'].forEach((v) {
        data.add(new Data.fromJson(v));
      });
    }
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['error'] = this.error;
    data['message'] = this.message;
    data['extra'] = this.extra;
    data['noData'] = this.noData;
    if (this.data != null) {
      data['data'] = this.data.map((v) => v.toJson()).toList();
    }
    return data;
  }
}

class Data {
  int type;
  int id;
  String content;
  int userId;
  String icon;
  bool unread;
  String name;
  double time;
  LikeContent likeContent;

  Data(
      {this.type,
      this.id,
      this.content,
      this.userId,
      this.icon,
      this.unread,
      this.name,
      this.time,
      this.likeContent});

  Data.fromJson(Map<String, dynamic> json) {
    type = json['type'];
    id = json['id'];
    content = json['content'];
    userId = json['user_id'];
    icon = json['icon'];
    unread = json['unread'];
    name = json['name'];
    time = json['time'];
    likeContent = json['like_content'] != null
        ? new LikeContent.fromJson(json['like_content'])
        : null;
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['type'] = this.type;
    data['id'] = this.id;
    data['content'] = this.content;
    data['user_id'] = this.userId;
    data['icon'] = this.icon;
    data['unread'] = this.unread;
    data['name'] = this.name;
    data['time'] = this.time;
    if (this.likeContent != null) {
      data['like_content'] = this.likeContent.toJson();
    }
    return data;
  }
}

class LikeContent {
  int type;
  int id;
  int contentType;
  String content;

  LikeContent({this.type, this.id, this.contentType, this.content});

  LikeContent.fromJson(Map<String, dynamic> json) {
    type = json['type'];
    id = json['id'];
    contentType = json['content_type'];
    content = json['content'];
  }

  Map<String, dynamic> toJson() {
    final Map<String, dynamic> data = new Map<String, dynamic>();
    data['type'] = this.type;
    data['id'] = this.id;
    data['content_type'] = this.contentType;
    data['content'] = this.content;
    return data;
  }
}