chore: core 多模块骨架
This commit is contained in:
27
IosClientKit/Sources/CoreModel/Habit.swift
Normal file
27
IosClientKit/Sources/CoreModel/Habit.swift
Normal file
@@ -0,0 +1,27 @@
|
||||
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
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user