Files
ios-client/IosClientKit/Sources/CoreModel/Habit.swift
2026-09-14 21:10:44 +08:00

28 lines
701 B
Swift
Raw 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
/// 一个打卡习惯(对应 Android 端 Habit)。
public struct Habit: Identifiable, Hashable, Sendable {
public let id: String
public let title: String
/// 备注 / 目标描述。
public let detail: String
/// 今日是否已打卡。
public let isCheckedInToday: Bool
/// 连续打卡天数。
public let streakDays: Int
public init(
id: String,
title: String,
detail: String,
isCheckedInToday: Bool,
streakDays: Int
) {
self.id = id
self.title = title
self.detail = detail
self.isCheckedInToday = isCheckedInToday
self.streakDays = streakDays
}
}