contents 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  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. <relationship name="forecasts" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Forecast" inverseName="orefDetermination" inverseEntity="Forecast"/>
  142. <fetchIndex name="byDate">
  143. <fetchIndexElement property="deliverAt" type="Binary" order="descending"/>
  144. </fetchIndex>
  145. <fetchIndex name="byTimestamp">
  146. <fetchIndexElement property="timestamp" type="Binary" order="ascending"/>
  147. </fetchIndex>
  148. </entity>
  149. <entity name="OverrideRunStored" representedClassName="OverrideRunStored" syncable="YES">
  150. <attribute name="endDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  151. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  152. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  153. <attribute name="name" optional="YES" attributeType="String"/>
  154. <attribute name="startDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  155. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  156. <relationship name="override" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OverrideStored" inverseName="overrideRun" inverseEntity="OverrideStored"/>
  157. <fetchIndex name="byDate">
  158. <fetchIndexElement property="startDate" type="Binary" order="ascending"/>
  159. </fetchIndex>
  160. </entity>
  161. <entity name="OverrideStored" representedClassName="OverrideStored" syncable="YES">
  162. <attribute name="advancedSettings" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  163. <attribute name="cr" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
  164. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  165. <attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  166. <attribute name="enabled" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  167. <attribute name="end" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  168. <attribute name="id" optional="YES" attributeType="String"/>
  169. <attribute name="indefinite" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  170. <attribute name="isf" optional="YES" attributeType="Boolean" defaultValueString="YES" usesScalarValueType="YES"/>
  171. <attribute name="isfAndCr" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  172. <attribute name="isPreset" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  173. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  174. <attribute name="name" optional="YES" attributeType="String"/>
  175. <attribute name="orderPosition" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  176. <attribute name="percentage" optional="YES" attributeType="Double" defaultValueString="100" usesScalarValueType="YES"/>
  177. <attribute name="smbIsOff" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  178. <attribute name="smbIsScheduledOff" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  179. <attribute name="smbMinutes" optional="YES" attributeType="Decimal" defaultValueString="30"/>
  180. <attribute name="start" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  181. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="0"/>
  182. <attribute name="uamMinutes" optional="YES" attributeType="Decimal" defaultValueString="30"/>
  183. <relationship name="overrideRun" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="OverrideRunStored" inverseName="override" inverseEntity="OverrideRunStored"/>
  184. <fetchIndex name="byDate">
  185. <fetchIndexElement property="date" type="Binary" order="descending"/>
  186. </fetchIndex>
  187. <fetchIndex name="byIsPreset">
  188. <fetchIndexElement property="isPreset" type="Binary" order="ascending"/>
  189. </fetchIndex>
  190. </entity>
  191. <entity name="PumpEventStored" representedClassName="PumpEventStored" syncable="YES">
  192. <attribute name="id" optional="YES" attributeType="String"/>
  193. <attribute name="isUploadedToHealth" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  194. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  195. <attribute name="isUploadedToTidepool" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  196. <attribute name="note" optional="YES" attributeType="String"/>
  197. <attribute name="timestamp" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  198. <attribute name="type" optional="YES" attributeType="String"/>
  199. <relationship name="bolus" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="BolusStored" inverseName="pumpEvent" inverseEntity="BolusStored"/>
  200. <relationship name="tempBasal" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TempBasalStored" inverseName="pumpEvent" inverseEntity="TempBasalStored"/>
  201. <fetchIndex name="byTimestamp">
  202. <fetchIndexElement property="timestamp" type="Binary" order="descending"/>
  203. </fetchIndex>
  204. <uniquenessConstraints>
  205. <uniquenessConstraint>
  206. <constraint value="id"/>
  207. </uniquenessConstraint>
  208. </uniquenessConstraints>
  209. </entity>
  210. <entity name="StatsData" representedClassName="StatsData" syncable="YES">
  211. <attribute name="lastrun" attributeType="Date" defaultDateTimeInterval="704497620" usesScalarValueType="NO"/>
  212. </entity>
  213. <entity name="TDDStored" representedClassName="TDDStored" syncable="YES">
  214. <attribute name="bolus" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  215. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  216. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  217. <attribute name="scheduledBasal" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  218. <attribute name="tempBasal" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  219. <attribute name="total" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  220. <attribute name="weightedAverage" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  221. </entity>
  222. <entity name="TempBasalStored" representedClassName="TempBasalStored" syncable="YES">
  223. <attribute name="duration" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  224. <attribute name="rate" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  225. <attribute name="tempType" optional="YES" attributeType="String"/>
  226. <relationship name="pumpEvent" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="PumpEventStored" inverseName="tempBasal" inverseEntity="PumpEventStored"/>
  227. </entity>
  228. <entity name="TempTargetRunStored" representedClassName="TempTargetRunStored" syncable="YES">
  229. <attribute name="endDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  230. <attribute name="id" optional="YES" attributeType="UUID" defaultValueString="empy" usesScalarValueType="NO"/>
  231. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  232. <attribute name="name" optional="YES" attributeType="String"/>
  233. <attribute name="startDate" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  234. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="160"/>
  235. <relationship name="tempTarget" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TempTargetStored" inverseName="tempTargetRun" inverseEntity="TempTargetStored"/>
  236. <fetchIndex name="byDate">
  237. <fetchIndexElement property="startDate" type="Binary" order="descending"/>
  238. </fetchIndex>
  239. </entity>
  240. <entity name="TempTargetStored" representedClassName="TempTargetStored" syncable="YES">
  241. <attribute name="date" optional="YES" attributeType="Date" usesScalarValueType="NO"/>
  242. <attribute name="duration" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  243. <attribute name="enabled" optional="YES" attributeType="Boolean" defaultValueString="NO" usesScalarValueType="YES"/>
  244. <attribute name="halfBasalTarget" optional="YES" attributeType="Decimal" defaultValueString="0.0"/>
  245. <attribute name="id" optional="YES" attributeType="UUID" usesScalarValueType="NO"/>
  246. <attribute name="isPreset" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  247. <attribute name="isUploadedToNS" optional="YES" attributeType="Boolean" usesScalarValueType="YES"/>
  248. <attribute name="name" optional="YES" attributeType="String"/>
  249. <attribute name="orderPosition" optional="YES" attributeType="Integer 16" defaultValueString="0" usesScalarValueType="YES"/>
  250. <attribute name="target" optional="YES" attributeType="Decimal" defaultValueString="160"/>
  251. <relationship name="tempTargetRun" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="TempTargetRunStored" inverseName="tempTarget" inverseEntity="TempTargetRunStored"/>
  252. <fetchIndex name="byDate">
  253. <fetchIndexElement property="date" type="Binary" order="descending"/>
  254. </fetchIndex>
  255. <fetchIndex name="byIsPreset">
  256. <fetchIndexElement property="isPreset" type="Binary" order="descending"/>
  257. </fetchIndex>
  258. </entity>
  259. </model>