/*
 * @Author       : WuWei
 * @LastEditors  : WuWei
 * @Date         : 2023-02-02 10:52:44
 * @LastEditTime : 2023-02-02 15:26:08
 * @Description  : Do not edit
 */
class DynamicItemModel {
  String? id;
  String? communityId;
  String? url;
  String? title;
  String? createdAt;
  bool? enable;
  String? createdBy;
  String? createdByName;
  String? imgUrl;
  String? publishAt;
  num? likes;
  bool? clickLike;
  String? updateAt;
  bool? isSelf;
  String? publishByName;
  DynamicItemModel({
    this.id,
    this.communityId,
    this.url,
    this.title,
    this.createdAt,
    this.enable,
    this.createdBy,
    this.createdByName,
    this.imgUrl,
    this.publishAt,
    this.likes,
    this.clickLike,
    this.updateAt,
    this.isSelf,
    this.publishByName,
  });

  DynamicItemModel.fromJson(json) {
    Map<String, dynamic> map = Map.from(json ?? {});

    id = map['id'];
    communityId = map['communityId'];
    url = map['url'];
    title = map['title'];
    createdAt = map['createdAt'];
    enable = map['enable'];
    createdBy = map['createdBy'];
    createdByName = map['createdByName'];
    imgUrl = map['imgUrl'];
    publishAt = map['publishAt'];
    likes = map['likes'];
    clickLike = map['clickLike'];
    updateAt = map['updateAt'];
    isSelf = map['isSelf'];
    publishByName = map['publishByName'];
  }

  Map<String, dynamic> toJson() {
    Map<String, dynamic> json = Map<String, dynamic>();

    json['id'] = this.id;
    json['communityId'] = this.communityId;
    json['url'] = this.url;
    json['title'] = this.title;
    json['createdAt'] = this.createdAt;
    json['enable'] = this.enable;
    json['createdBy'] = this.createdBy;
    json['createdByName'] = this.createdByName;
    json['imgUrl'] = this.imgUrl;
    json['publishAt'] = this.publishAt;
    json['likes'] = this.likes;
    json['clickLike'] = this.clickLike;
    json['updateAt'] = this.updateAt;
    json['isSelf'] = this.isSelf;
    json['publishByName'] = this.publishByName;
    return json;
  }
}
