Files
2026-09-14 21:10:44 +08:00

20 lines
630 B
Swift
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
import Foundation
/// Home 页面的聚合数据(对应 Android 端 HomeData)。
public struct HomeData: Identifiable, Hashable, Sendable {
public let id: String
/// 顶部问候语,例如「早上好,Andy」。
public let greeting: String
/// 今日打卡摘要,例如「已完成 2 / 4」。
public let summary: String
/// 今日待打卡的习惯列表。
public let habits: [Habit]
public init(id: String, greeting: String, summary: String, habits: [Habit]) {
self.id = id
self.greeting = greeting
self.summary = summary
self.habits = habits
}
}