+/***
+ * @Date: 2024-06-25 10:34:10
+ * @LastEditors: Caisking 3449750381@qq.com
+ * @LastEditTime: 2024-06-26 09:51:50
+ * @FilePath: /FD230/code/sdk/application/wearable/fd230app/nativeui/sleep/include/SleepModel.h
+ */
+
+#ifndef Sleep_MODEL_H
+#define Sleep_MODEL_H
+
+#include <cstdint>
+#include <map>
+#include "AppViewIDs.h"
+#include "UiConfig.h"
+#include "sleep/include/SleepView.h"
+#include "sleep/include/SleepControlPresenter.h"
+#include "string"
+namespace OHOS
+{
+ class SleepModel
+ {
+ public:
+ static SleepModel &GetInstance(void);
+ void GetSleepTime(); // 获取睡眠时间
+ std::string GetSleepStr(); // 解析睡眠时间
+ void GetRestTime(); // 获取入睡时间
+ std::string GetRestStr(); // 解析入睡时间
+ void GetWalkTime(); // 获取醒来时间
+ std::string GetWalkStr(); // 解析醒来时间
+ void GetGoalTime(); // 获取目标休息时间(xx-xx)
+ std::string GetGoalStr(); // 解析目标休息时间
+
+ private:
+ SleepModel();
+ SleepModel(const SleepModel &);
+ SleepModel &operator=(const SleepModel &);
+ virtual ~SleepModel();
+
+ std::string sleepStr;
+ std::string restStr;
+ std::string walkStr;
+ std::string goalsleepStr;
+ std::string goalwalkStr;
+ };
+}
+
+#endif // Sleep_MODEL_H
\ No newline at end of file
+
+#include "sleep/include/SleepModel.h"
+#include "kv_store.h"
+#include "securec.h"
+
+namespace OHOS
+{
+ SleepModel::SleepModel() {}
+ SleepModel::~SleepModel() {}
+ SleepModel &SleepModel::GetInstance()
+ {
+ static SleepModel instance;
+ return instance;
+ }
+}
\ No newline at end of file