chore: core 多模块骨架

This commit is contained in:
AndyChen1024
2026-09-14 21:10:44 +08:00
parent 295efac07c
commit 4fe0a26432
14 changed files with 294 additions and 0 deletions

View File

@@ -0,0 +1,16 @@
import CoreModel
/// 获取 Home 数据的用例。
/// Kotlin: class HomeUseCase(...) { suspend operator fun invoke(): HomeData }
public struct HomeUseCase: Sendable {
private let repository: HomeRepository
public init(repository: HomeRepository) {
self.repository = repository
}
/// Kotlin: Flow<HomeData> → Swift: AsyncThrowingStream<HomeData, Error>
public func observeHome() -> AsyncThrowingStream<HomeData, Error> {
repository.observeHome()
}
}