From 908ca1d4c94824f6a956f05f4a01c8206ee2433e Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Mon, 18 Mar 2024 23:07:01 +0100 Subject: [PATCH] Updated the Review model in the Feed framework to include the Rating struct. --- .../Bundle/Sources/Logic/Models/Review.swift | 30 +++++++++++++------ .../Sources/UI/Components/ReviewCell.swift | 2 +- .../DetailsViewController.swift | 2 +- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/Frameworks/Feed/Bundle/Sources/Logic/Models/Review.swift b/Frameworks/Feed/Bundle/Sources/Logic/Models/Review.swift index 5793335..aa88fd0 100644 --- a/Frameworks/Feed/Bundle/Sources/Logic/Models/Review.swift +++ b/Frameworks/Feed/Bundle/Sources/Logic/Models/Review.swift @@ -1,5 +1,5 @@ // -// AppDelegate.swift +// Review.swift // ReviewsFeed // // Created by Dmitrii Ivanov on 21/07/2020. @@ -9,18 +9,30 @@ import Foundation struct Review { - let author: String - let version: String - let rating: Int - let title: String - let id: String - let content: String + // MARK: Constants + let author: String + let comment: String + let id: Int + let rating: Rating + let title: String + func ratingVersionText() -> String { var stars = "" - for _ in 0..