contents 22 KB

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