contents 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <model type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="23605" systemVersion="24C101" 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="ContactImageEntryStored" representedClassName="ContactImageEntryStored" 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="hasHighContrast" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  36. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  37. <attribute name="layout" optional="YES" attributeType="String"/>
  38. <attribute name="name" optional="YES" attributeType="String"/>
  39. <attribute name="primary" optional="YES" attributeType="String"/>
  40. <attribute name="ring" optional="YES" attributeType="String"/>
  41. <attribute name="ringGap" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  42. <attribute name="ringWidth" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  43. <attribute name="top" optional="YES" attributeType="String"/>
  44. </entity>
  45. <entity name="Forecast" representedClassName="Forecast" syncable="YES">
  46. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  47. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  48. <attribute name="type" optional="YES" attributeType="String"/>
  49. <relationship name="forecastValues" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="ForecastValue" inverseName="forecast" inverseEntity="ForecastValue"/>
  50. <relationship name="orefDetermination" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OrefDetermination" inverseName="forecasts" inverseEntity="OrefDetermination"/>
  51. <fetchIndex name="byDate">
  52. <fetchIndexElement property="date" type="Binary" order="descending"/>
  53. </fetchIndex>
  54. <fetchIndex name="byValue">
  55. <fetchIndexElement property="forecastValues" type="Binary" order="ascending"/>
  56. </fetchIndex>
  57. </entity>
  58. <entity name="ForecastValue" representedClassName="ForecastValue" syncable="YES">
  59. <attribute name="index" optional="YES" attributeType="Integer 32" defaultValueString="0" usesScalarValueType="YES"/>
  60. <attribute name="value" optional="YES" attributeType="Integer 32" defaultValueString="0.0" usesScalarValueType="YES"/>
  61. <relationship name="forecast" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Forecast" inverseName="forecastValues" inverseEntity="Forecast"/>
  62. </entity>
  63. <entity name="GlucoseStored" representedClassName="GlucoseStored" syncable="YES">
  64. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  65. <attribute name="direction" optional="YES" attributeType="String"/>
  66. <attribute name="glucose" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  67. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  68. <attribute name="isManual" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  69. <attribute name="isUploadedToHealth" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  70. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  71. <attribute name="isUploadedToTidepool" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  72. <fetchIndex name="byDate">
  73. <fetchIndexElement property="date" type="Binary" order="ascending"/>
  74. </fetchIndex>
  75. <fetchIndex name="byIsManual">
  76. <fetchIndexElement property="isManual" type="Binary" order="ascending"/>
  77. </fetchIndex>
  78. <fetchIndex name="byIsUploadedToNS">
  79. <fetchIndexElement property="isUploadedToNS" type="Binary" order="ascending"/>
  80. </fetchIndex>
  81. <fetchIndex name="byIsUploadedToHealth">
  82. <fetchIndexElement property="isUploadedToHealth" type="Binary" order="ascending"/>
  83. </fetchIndex>
  84. </entity>
  85. <entity name="LoopStatRecord" representedClassName="LoopStatRecord" syncable="YES">
  86. <attribute name="duration" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
  87. <attribute name="end" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  88. <attribute name="interval" optional="YES" attributeType="Double" defaultValueString="0.0" usesScalarValueType="YES"/>
  89. <attribute name="loopStatus" optional="YES" attributeType="String"/>
  90. <attribute name="start" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  91. </entity>
  92. <entity name="MealPresetStored" representedClassName="MealPresetStored" syncable="YES">
  93. <attribute name="carbs" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  94. <attribute name="dish" optional="YES" attributeType="String"/>
  95. <attribute name="fat" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  96. <attribute name="protein" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  97. </entity>
  98. <entity name="OpenAPS_Battery" representedClassName="OpenAPS_Battery" syncable="YES">
  99. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  100. <attribute name="display" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  101. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  102. <attribute name="percent" optional="YES" attributeType="Double" defaultValueString="0" usesScalarValueType="YES"/>
  103. <attribute name="status" optional="YES" attributeType="String"/>
  104. <attribute name="voltage" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  105. <fetchIndex name="byDate">
  106. <fetchIndexElement property="date" type="Binary" order="descending"/>
  107. </fetchIndex>
  108. </entity>
  109. <entity name="OrefDetermination" representedClassName="OrefDetermination" syncable="YES">
  110. <attribute name="bolus" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  111. <attribute name="carbRatio" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  112. <attribute name="carbsRequired" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  113. <attribute name="cob" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  114. <attribute name="currentTarget" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  115. <attribute name="deliverAt" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  116. <attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0"/>
  117. <attribute name="enacted" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  118. <attribute name="eventualBG" optional="YES" attributeType="Decimal" defaultValueString="0"/>
  119. <attribute name="expectedDelta" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  120. <attribute name="glucose" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  121. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  122. <attribute name="insulinForManualBolus" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  123. <attribute name="insulinReq" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  124. <attribute name="insulinSensitivity" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  125. <attribute name="iob" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  126. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  127. <attribute name="manualBolusErrorString" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  128. <attribute name="minDelta" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  129. <attribute name="rate" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  130. <attribute name="reason" optional="YES" attributeType="String"/>
  131. <attribute name="received" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  132. <attribute name="reservoir" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  133. <attribute name="scheduledBasal" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  134. <attribute name="sensitivityRatio" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  135. <attribute name="smbToDeliver" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  136. <attribute name="temp" optional="YES" attributeType="String"/>
  137. <attribute name="tempBasal" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  138. <attribute name="threshold" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  139. <attribute name="timestamp" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  140. <attribute name="timestampEnacted" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  141. <attribute name="totalDailyDose" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  142. <relationship name="forecasts" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Forecast" inverseName="orefDetermination" inverseEntity="Forecast"/>
  143. <fetchIndex name="byDate">
  144. <fetchIndexElement property="deliverAt" type="Binary" order="descending"/>
  145. </fetchIndex>
  146. <fetchIndex name="byTimestamp">
  147. <fetchIndexElement property="timestamp" type="Binary" order="ascending"/>
  148. </fetchIndex>
  149. </entity>
  150. <entity name="OverrideRunStored" representedClassName="OverrideRunStored" syncable="YES">
  151. <attribute name="endDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  152. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  153. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  154. <attribute name="name" optional="YES" attributeType="String"/>
  155. <attribute name="startDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  156. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  157. <relationship name="override" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OverrideStored" inverseName="overrideRun" inverseEntity="OverrideStored"/>
  158. <fetchIndex name="byDate">
  159. <fetchIndexElement property="startDate" type="Binary" order="ascending"/>
  160. </fetchIndex>
  161. </entity>
  162. <entity name="OverrideStored" representedClassName="OverrideStored" syncable="YES">
  163. <attribute name="advancedSettings" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  164. <attribute name="cr" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
  165. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  166. <attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  167. <attribute name="enabled" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  168. <attribute name="end" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  169. <attribute name="id" optional="YES" attributeType="String"/>
  170. <attribute name="indefinite" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  171. <attribute name="isf" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
  172. <attribute name="isfAndCr" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  173. <attribute name="isPreset" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  174. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  175. <attribute name="name" optional="YES" attributeType="String"/>
  176. <attribute name="orderPosition" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  177. <attribute name="percentage" optional="YES" attributeType="Double" defaultValueString="100" usesScalarValueType="YES"/>
  178. <attribute name="smbIsOff" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  179. <attribute name="smbIsScheduledOff" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  180. <attribute name="smbMinutes" optional="YES" attributeType="Decimal" defaultValueString="30"/>
  181. <attribute name="start" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  182. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="0"/>
  183. <attribute name="uamMinutes" optional="YES" attributeType="Decimal" defaultValueString="30"/>
  184. <relationship name="overrideRun" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OverrideRunStored" inverseName="override" inverseEntity="OverrideRunStored"/>
  185. <fetchIndex name="byDate">
  186. <fetchIndexElement property="date" type="Binary" order="descending"/>
  187. </fetchIndex>
  188. <fetchIndex name="byIsPreset">
  189. <fetchIndexElement property="isPreset" type="Binary" order="ascending"/>
  190. </fetchIndex>
  191. </entity>
  192. <entity name="PumpEventStored" representedClassName="PumpEventStored" syncable="YES">
  193. <attribute name="id" optional="YES" attributeType="String"/>
  194. <attribute name="isUploadedToHealth" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  195. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  196. <attribute name="isUploadedToTidepool" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  197. <attribute name="note" optional="YES" attributeType="String"/>
  198. <attribute name="timestamp" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  199. <attribute name="type" optional="YES" attributeType="String"/>
  200. <relationship name="bolus" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="BolusStored" inverseName="pumpEvent" inverseEntity="BolusStored"/>
  201. <relationship name="tempBasal" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TempBasalStored" inverseName="pumpEvent" inverseEntity="TempBasalStored"/>
  202. <fetchIndex name="byTimestamp">
  203. <fetchIndexElement property="timestamp" type="Binary" order="descending"/>
  204. </fetchIndex>
  205. <uniquenessConstraints>
  206. <uniquenessConstraint>
  207. <constraint value="id"/>
  208. </uniquenessConstraint>
  209. </uniquenessConstraints>
  210. </entity>
  211. <entity name="StatsData" representedClassName="StatsData" syncable="YES">
  212. <attribute name="lastrun" attributeType="Date" defaultDateTimeInterval="704497620" usesScalarValueType="NO"/>
  213. </entity>
  214. <entity name="TDDStored" representedClassName="TDDStored" syncable="YES">
  215. <attribute name="bolus" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  216. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  217. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  218. <attribute name="scheduledBasal" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  219. <attribute name="tempBasal" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  220. <attribute name="total" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  221. <attribute name="weightedAverage" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  222. </entity>
  223. <entity name="TempBasalStored" representedClassName="TempBasalStored" syncable="YES">
  224. <attribute name="duration" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  225. <attribute name="rate" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  226. <attribute name="tempType" optional="YES" attributeType="String"/>
  227. <relationship name="pumpEvent" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="PumpEventStored" inverseName="tempBasal" inverseEntity="PumpEventStored"/>
  228. </entity>
  229. <entity name="TempTargetRunStored" representedClassName="TempTargetRunStored" syncable="YES">
  230. <attribute name="endDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  231. <attribute name="id" optional="YES" attributeType="UUID" defaultValueString="empy" usesScalarValueType="NO"/>
  232. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  233. <attribute name="name" optional="YES" attributeType="String"/>
  234. <attribute name="startDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  235. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="160"/>
  236. <relationship name="tempTarget" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TempTargetStored" inverseName="tempTargetRun" inverseEntity="TempTargetStored"/>
  237. <fetchIndex name="byDate">
  238. <fetchIndexElement property="startDate" type="Binary" order="descending"/>
  239. </fetchIndex>
  240. </entity>
  241. <entity name="TempTargetStored" representedClassName="TempTargetStored" syncable="YES">
  242. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  243. <attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  244. <attribute name="enabled" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  245. <attribute name="halfBasalTarget" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  246. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  247. <attribute name="isPreset" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  248. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  249. <attribute name="name" optional="YES" attributeType="String"/>
  250. <attribute name="orderPosition" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  251. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="160"/>
  252. <relationship name="tempTargetRun" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TempTargetRunStored" inverseName="tempTarget" inverseEntity="TempTargetRunStored"/>
  253. <fetchIndex name="byDate">
  254. <fetchIndexElement property="date" type="Binary" order="descending"/>
  255. </fetchIndex>
  256. <fetchIndex name="byIsPreset">
  257. <fetchIndexElement property="isPreset" type="Binary" order="descending"/>
  258. </fetchIndex>
  259. </entity>
  260. </model>