class ImageListData: ObservableObject { var index: Int = 0 fileprivate(set) var images: [ProductImage] = [] } final class PriceData: ObservableObject { var price: String = "" var referencePrice: String = "" var discountRate: String? } final class TitleData: ObservableObject { var title: String = "" var vendor: String = "" } final class DescriptionData: ObservableObject { var description: String = "" } final class GroupRequirementsData: ObservableObject { var lowerLimitUserCountText: String = "" } … 17 ProductDetailViewModel.swift
return Future { [weak self] promise in self?.getProduct(productId: productId) { result in switch result { case .success(let response): promise(.success(response)) case .failure(let error): promise(.failure(error)) } } }.eraseToAnyPublisher() } } 29 ProductRepository.swift