contents 18 KB

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