-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add PomodoroModel, LocalStorageService, DateModel, and HealhKitService
- Loading branch information
1 parent
499255e
commit 73bde5e
Showing
7 changed files
with
333 additions
and
258 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
// | ||
// DateModel.swift | ||
// PulsePomodoro Watch App | ||
// | ||
// Created by Mateus Henrique on 05/03/24. | ||
// | ||
|
||
import Foundation | ||
|
||
extension Date { | ||
init(month: Int, day: Int, year: Int, hour: Int = 0, minute: Int = 0, second: Int = 0) { | ||
var dateComponents = DateComponents() | ||
dateComponents.month = month | ||
dateComponents.day = day | ||
dateComponents.year = year | ||
dateComponents.hour = hour | ||
dateComponents.minute = minute | ||
dateComponents.second = second | ||
dateComponents.timeZone = .current | ||
dateComponents.calendar = .current | ||
self = Calendar.current.date(from: dateComponents) ?? Date() | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
// | ||
// PomodoroModel.swift | ||
// PulsePomodoro Watch App | ||
// | ||
// Created by Mateus Henrique on 05/03/24. | ||
// | ||
|
||
import Foundation | ||
|
||
struct Pomodoro: Codable { | ||
var heartRate: Int | ||
var respiratoryRate: Int | ||
var startDate: Date | ||
var endDate: Date | ||
var duration: Int | ||
var isHeartRateNormal: Bool | ||
var isRespirationRateNormal: Bool | ||
var isCompleted: Bool | ||
} | ||
|
Oops, something went wrong.