contents 18 KB

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