feat: 定义仓库协议与用例(含会话)
This commit is contained in:
9
IosClientKit/Sources/CoreDomain/CheckinRepository.swift
Normal file
9
IosClientKit/Sources/CoreDomain/CheckinRepository.swift
Normal file
@@ -0,0 +1,9 @@
|
||||
import CoreModel
|
||||
|
||||
/// 打卡数据仓库协议(定义在 domain 层,实现放 CoreRepository)。
|
||||
public protocol CheckinRepository: Sendable {
|
||||
/// 观察打卡数据。
|
||||
func observeCheckin() -> AsyncThrowingStream<CheckinRecord, Error>
|
||||
/// 提交打卡状态。
|
||||
func submitCheckin(status: CheckinStatus) async throws
|
||||
}
|
||||
Reference in New Issue
Block a user