def reaction_dtos(): reaction_dtos = [ ReactionDto(reaction_id=1, comment_id=None, post_id=1, user_id=1, reaction_type=ReactionType.HAHA), ReactionDto(reaction_id=2, comment_id=1, post_id=None, user_id=1, reaction_type=ReactionType.HAHA) ] return reaction_dtos
def reaction_dtos(): reaction_dtos = [ ReactionDto(reaction_id=1, post_id=1, user_id=1, reaction_type=ReactionType.LIKE.value, comment_id=None), ReactionDto(reaction_id=2, post_id=None, user_id=1, reaction_type=ReactionType.SAD.value, comment_id=1) ] return reaction_dtos
def _convert_comment_reaction_object_to_dto(reaction): reaction_dto = ReactionDto(reaction_id=reaction.id, user_id=reaction.user.id, comment_id=reaction.comment.id, post_id=reaction.post, reaction_type=reaction.reaction_type) return reaction_dto
def post_reaction_dtos(): post_reaction_dtos = [ ReactionDto(reaction_id=1, post_id=1, user_id=1, reaction_type=ReactionType.LIKE.value, comment_id=None) ] return post_reaction_dtos