import 'package:domain/generated/json/base/json_convert_content.dart'; import 'package:domain/entity/newsfeed_comment_publish_entity.dart'; NewsfeedCommentPublishEntity $NewsfeedCommentPublishEntityFromJson(Map json) { final NewsfeedCommentPublishEntity newsfeedCommentPublishEntity = NewsfeedCommentPublishEntity(); final int? id = jsonConvert.convert(json['id']); if (id != null) { newsfeedCommentPublishEntity.id = id; } final String? content = jsonConvert.convert(json['content']); if (content != null) { newsfeedCommentPublishEntity.content = content; } final int? toUserId = jsonConvert.convert(json['to_user_id']); if (toUserId != null) { newsfeedCommentPublishEntity.toUserId = toUserId; } return newsfeedCommentPublishEntity; } Map $NewsfeedCommentPublishEntityToJson(NewsfeedCommentPublishEntity entity) { final Map data = {}; data['id'] = entity.id; data['content'] = entity.content; data['to_user_id'] = entity.toUserId; return data; } extension NewsfeedCommentPublishEntityExtension on NewsfeedCommentPublishEntity { NewsfeedCommentPublishEntity copyWith({ int? id, String? content, int? toUserId, }) { return NewsfeedCommentPublishEntity() ..id = id ?? this.id ..content = content ?? this.content ..toUserId = toUserId ?? this.toUserId; } }