contents 20 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="23231" systemVersion="24B91" minimumToolsVersion="Automatic" sourceLanguage="Swift" usedWithSwiftData="YES" userDefinedModelVersionIdentifier="">
  3. <entity name="BolusStored" representedClassName="BolusStored" syncable="YES">
  4. <attribute name="amount" optional="YES" attributeType="Decimal" defaultValueString="0"/>
  5. <attribute name="isExternal" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  6. <attribute name="isSMB" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
  7. <relationship name="pumpEvent" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="PumpEventStored" inverseName="bolus" inverseEntity="PumpEventStored"/>
  8. </entity>
  9. <entity name="CarbEntryStored" representedClassName="CarbEntryStored" syncable="YES">
  10. <attribute name="carbs" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
  11. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  12. <attribute name="fat" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
  13. <attribute name="fpuID" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  14. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  15. <attribute name="isFPU" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  16. <attribute name="isUploadedToHealth" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  17. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  18. <attribute name="isUploadedToTidepool" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  19. <attribute name="note" optional="YES" attributeType="String"/>
  20. <attribute name="protein" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
  21. <fetchIndex name="byDate">
  22. <fetchIndexElement property="date" type="Binary" order="descending"/>
  23. </fetchIndex>
  24. <fetchIndex name="byIsFPU">
  25. <fetchIndexElement property="isFPU" type="Binary" order="ascending"/>
  26. </fetchIndex>
  27. </entity>
  28. <entity name="ContactTrickEntryStored" representedClassName="ContactTrickEntryStored" syncable="YES" codeGenerationType="class">
  29. <attribute name="bottom" optional="YES" attributeType="String"/>
  30. <attribute name="contactId" optional="YES" attributeType="String"/>
  31. <attribute name="fontSize" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  32. <attribute name="fontSizeSecondary" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  33. <attribute name="fontWeight" optional="YES" attributeType="String"/>
  34. <attribute name="fontWidth" optional="YES" attributeType="String"/>
  35. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  36. <attribute name="isDarkMode" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  37. <attribute name="layout" optional="YES" attributeType="String"/>
  38. <attribute name="primary" optional="YES" attributeType="String"/>
  39. <attribute name="ring" optional="YES" attributeType="String"/>
  40. <attribute name="ringGap" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  41. <attribute name="ringWidth" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  42. <attribute name="top" optional="YES" attributeType="String"/>
  43. </entity>
  44. <entity name="Forecast" representedClassName="Forecast" syncable="YES">
  45. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  46. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  47. <attribute name="type" optional="YES" attributeType="String"/>
  48. <relationship name="forecastValues" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="ForecastValue" inverseName="forecast" inverseEntity="ForecastValue"/>
  49. <relationship name="orefDetermination" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OrefDetermination" inverseName="forecasts" inverseEntity="OrefDetermination"/>
  50. <fetchIndex name="byDate">
  51. <fetchIndexElement property="date" type="Binary" order="descending"/>
  52. </fetchIndex>
  53. </entity>
  54. <entity name="ForecastValue" representedClassName="ForecastValue" syncable="YES">
  55. <attribute name="index" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
  56. <attribute name="value" optional="YES" attributeType="Integer 32" defaultValueString="0.0" usesScalarValueType="YES"/>
  57. <relationship name="forecast" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Forecast" inverseName="forecastValues" inverseEntity="Forecast"/>
  58. </entity>
  59. <entity name="GlucoseStored" representedClassName="GlucoseStored" syncable="YES">
  60. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  61. <attribute name="direction" optional="YES" attributeType="String"/>
  62. <attribute name="glucose" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  63. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  64. <attribute name="isManual" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  65. <attribute name="isUploadedToHealth" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  66. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  67. <attribute name="isUploadedToTidepool" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  68. <fetchIndex name="byDate">
  69. <fetchIndexElement property="date" type="Binary" order="ascending"/>
  70. </fetchIndex>
  71. <fetchIndex name="byIsManual">
  72. <fetchIndexElement property="isManual" type="Binary" order="ascending"/>
  73. </fetchIndex>
  74. <fetchIndex name="byIsUploadedToNS">
  75. <fetchIndexElement property="isUploadedToNS" type="Binary" order="ascending"/>
  76. </fetchIndex>
  77. <fetchIndex name="byIsUploadedToHealth">
  78. <fetchIndexElement property="isUploadedToHealth" type="Binary" order="ascending"/>
  79. </fetchIndex>
  80. </entity>
  81. <entity name="LoopStatRecord" representedClassName="LoopStatRecord" syncable="YES">
  82. <attribute name="duration" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
  83. <attribute name="end" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  84. <attribute name="interval" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
  85. <attribute name="loopStatus" optional="YES" attributeType="String"/>
  86. <attribute name="start" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  87. </entity>
  88. <entity name="MealPresetStored" representedClassName="MealPresetStored" syncable="YES">
  89. <attribute name="carbs" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  90. <attribute name="dish" optional="YES" attributeType="String"/>
  91. <attribute name="fat" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  92. <attribute name="protein" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  93. </entity>
  94. <entity name="OpenAPS_Battery" representedClassName="OpenAPS_Battery" syncable="YES">
  95. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  96. <attribute name="display" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  97. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  98. <attribute name="percent" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  99. <attribute name="status" optional="YES" attributeType="String"/>
  100. <attribute name="voltage" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  101. <fetchIndex name="byDate">
  102. <fetchIndexElement property="date" type="Binary" order="descending"/>
  103. </fetchIndex>
  104. </entity>
  105. <entity name="OrefDetermination" representedClassName="OrefDetermination" syncable="YES">
  106. <attribute name="bolus" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  107. <attribute name="carbRatio" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  108. <attribute name="carbsRequired" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  109. <attribute name="cob" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  110. <attribute name="currentTarget" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  111. <attribute name="deliverAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  112. <attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0"/>
  113. <attribute name="enacted" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  114. <attribute name="eventualBG" optional="YES" attributeType="Decimal" defaultValueString="0"/>
  115. <attribute name="expectedDelta" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  116. <attribute name="glucose" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  117. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  118. <attribute name="insulinForManualBolus" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  119. <attribute name="insulinReq" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  120. <attribute name="insulinSensitivity" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  121. <attribute name="iob" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  122. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  123. <attribute name="manualBolusErrorString" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  124. <attribute name="minDelta" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  125. <attribute name="rate" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  126. <attribute name="reason" optional="YES" attributeType="String"/>
  127. <attribute name="received" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  128. <attribute name="reservoir" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  129. <attribute name="scheduledBasal" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  130. <attribute name="sensitivityRatio" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  131. <attribute name="smbToDeliver" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  132. <attribute name="temp" optional="YES" attributeType="String"/>
  133. <attribute name="tempBasal" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  134. <attribute name="threshold" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  135. <attribute name="timestamp" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  136. <attribute name="timestampEnacted" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  137. <attribute name="totalDailyDose" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  138. <relationship name="forecasts" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Forecast" inverseName="orefDetermination" inverseEntity="Forecast"/>
  139. <fetchIndex name="byDate">
  140. <fetchIndexElement property="deliverAt" type="Binary" order="descending"/>
  141. </fetchIndex>
  142. </entity>
  143. <entity name="OverrideRunStored" representedClassName="OverrideRunStored" syncable="YES">
  144. <attribute name="endDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  145. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  146. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  147. <attribute name="name" optional="YES" attributeType="String"/>
  148. <attribute name="startDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  149. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  150. <relationship name="override" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OverrideStored" inverseName="overrideRun" inverseEntity="OverrideStored"/>
  151. <fetchIndex name="byDate">
  152. <fetchIndexElement property="startDate" type="Binary" order="ascending"/>
  153. </fetchIndex>
  154. </entity>
  155. <entity name="OverrideStored" representedClassName="OverrideStored" syncable="YES">
  156. <attribute name="advancedSettings" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  157. <attribute name="cr" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
  158. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  159. <attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  160. <attribute name="enabled" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  161. <attribute name="end" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  162. <attribute name="id" optional="YES" attributeType="String"/>
  163. <attribute name="indefinite" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  164. <attribute name="isf" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
  165. <attribute name="isfAndCr" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  166. <attribute name="isPreset" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  167. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  168. <attribute name="name" optional="YES" attributeType="String"/>
  169. <attribute name="orderPosition" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  170. <attribute name="percentage" optional="YES" attributeType="Double" defaultValueString="100" usesScalarValueType="YES"/>
  171. <attribute name="smbIsAlwaysOff" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  172. <attribute name="smbIsOff" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  173. <attribute name="smbMinutes" optional="YES" attributeType="Decimal" defaultValueString="30"/>
  174. <attribute name="start" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  175. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="0"/>
  176. <attribute name="uamMinutes" optional="YES" attributeType="Decimal" defaultValueString="30"/>
  177. <relationship name="overrideRun" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OverrideRunStored" inverseName="override" inverseEntity="OverrideRunStored"/>
  178. <fetchIndex name="byDate">
  179. <fetchIndexElement property="date" type="Binary" order="descending"/>
  180. </fetchIndex>
  181. <fetchIndex name="byIsPreset">
  182. <fetchIndexElement property="isPreset" type="Binary" order="ascending"/>
  183. </fetchIndex>
  184. </entity>
  185. <entity name="PumpEventStored" representedClassName="PumpEventStored" syncable="YES">
  186. <attribute name="id" optional="YES" attributeType="String"/>
  187. <attribute name="isUploadedToHealth" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  188. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  189. <attribute name="isUploadedToTidepool" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  190. <attribute name="note" optional="YES" attributeType="String"/>
  191. <attribute name="timestamp" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  192. <attribute name="type" optional="YES" attributeType="String"/>
  193. <relationship name="bolus" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="BolusStored" inverseName="pumpEvent" inverseEntity="BolusStored"/>
  194. <relationship name="tempBasal" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TempBasalStored" inverseName="pumpEvent" inverseEntity="TempBasalStored"/>
  195. <fetchIndex name="byTimestamp">
  196. <fetchIndexElement property="timestamp" type="Binary" order="descending"/>
  197. </fetchIndex>
  198. <uniquenessConstraints>
  199. <uniquenessConstraint>
  200. <constraint value="id"/>
  201. </uniquenessConstraint>
  202. </uniquenessConstraints>
  203. </entity>
  204. <entity name="StatsData" representedClassName="StatsData" syncable="YES">
  205. <attribute name="lastrun" attributeType="Date" defaultDateTimeInterval="704497620" usesScalarValueType="NO"/>
  206. </entity>
  207. <entity name="TempBasalStored" representedClassName="TempBasalStored" syncable="YES">
  208. <attribute name="duration" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  209. <attribute name="rate" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  210. <attribute name="tempType" optional="YES" attributeType="String"/>
  211. <relationship name="pumpEvent" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="PumpEventStored" inverseName="tempBasal" inverseEntity="PumpEventStored"/>
  212. </entity>
  213. <entity name="TempTargets" representedClassName="TempTargets" syncable="YES">
  214. <attribute name="active" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  215. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  216. <attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  217. <attribute name="hbt" optional="YES" attributeType="Double" defaultValueString="160" usesScalarValueType="YES"/>
  218. <attribute name="id" optional="YES" attributeType="String"/>
  219. <attribute name="startDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  220. <fetchIndex name="byDate">
  221. <fetchIndexElement property="date" type="Binary" order="descending"/>
  222. </fetchIndex>
  223. </entity>
  224. <entity name="TempTargetsSlider" representedClassName="TempTargetsSlider" syncable="YES">
  225. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  226. <attribute name="defaultHBT" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
  227. <attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  228. <attribute name="enabled" optional="YES" attributeType="Boolean" defaultValueString="100" usesScalarValueType="YES"/>
  229. <attribute name="hbt" optional="YES" attributeType="Double" defaultValueString="160" usesScalarValueType="YES"/>
  230. <attribute name="id" optional="YES" attributeType="String" defaultValueString="empy"/>
  231. <attribute name="isPreset" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  232. <fetchIndex name="byDate">
  233. <fetchIndexElement property="date" type="Binary" order="descending"/>
  234. </fetchIndex>
  235. </entity>
  236. </model>