20 lines
630 B
Swift
20 lines
630 B
Swift
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
|
||
}
|
||
}
|