class Bell { int? offset; String? result; List? items; Bell({ this.offset, this.result, this.items, }); Bell.fromJson(Map json) { offset = json["offset"]; result = json["result"]; if (json['items'] != null) { items = []; json['items'].forEach((v) { items!.add(BellItems.fromJson(v)); }); } else { items = []; } } } class BellItems { String? id; String? notifiType; String? userId; String? eventType; ItemDetail? itemDetail; int? status; DateTime? createdAt; DateTime? updatedAt; BellItems( {this.id, this.eventType, this.status, this.createdAt, this.updatedAt}); BellItems.fromJson(Map json) { id = json["id"]; notifiType = json["notifi_type"]; userId = json["user_id"]; eventType = json["event_type"]; status = json["status"]; itemDetail = json['detail'] != null ? ItemDetail.fromJson(json['detail']) : null; createdAt = DateTime.parse(json["created_at"]); updatedAt = DateTime.parse(json["updated_at"]); } static List fromJsonDynamicList(List list) { return list.map((e) => BellItems.fromJson(e)).toList(); } } class ItemDetail { String? sourceId; String? sourceName; String? targetId; String? targetName; ItemDetail({ this.sourceId, this.sourceName, this.targetId, this.targetName, }); ItemDetail.fromJson(Map json) { sourceId = json["source_id"]; sourceName = json["source_name"]; targetId = json["target_id"]; targetName = json["target_name"]; } }