contents 8.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <model userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="3396" systemVersion="12F37" minimumToolsVersion="Xcode 4.3" macOSVersion="Automatic" iOSVersion="Automatic">
  3. <entity name="Contact" representedClassName="Contact" syncable="YES">
  4. <attribute name="abRecordId" optional="YES" attributeType="Integer 32" indexed="YES" syncable="YES"/>
  5. <attribute name="firstName" optional="YES" attributeType="String" syncable="YES"/>
  6. <attribute name="identity" attributeType="String" indexed="YES" syncable="YES"/>
  7. <attribute name="imageData" optional="YES" attributeType="Binary" syncable="YES"/>
  8. <attribute name="lastName" optional="YES" attributeType="String" syncable="YES"/>
  9. <attribute name="publicKey" attributeType="Binary" syncable="YES"/>
  10. <attribute name="publicNickname" optional="YES" attributeType="String" syncable="YES"/>
  11. <attribute name="sortIndex" optional="YES" attributeType="Integer 32" defaultValueString="0" indexed="YES" syncable="YES"/>
  12. <attribute name="sortInitial" optional="YES" attributeType="String" syncable="YES"/>
  13. <attribute name="verificationLevel" attributeType="Integer 16" syncable="YES"/>
  14. <attribute name="verifiedEmail" optional="YES" attributeType="String" syncable="YES"/>
  15. <attribute name="verifiedMobileNo" optional="YES" attributeType="String" syncable="YES"/>
  16. <relationship name="conversations" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Conversation" inverseName="contact" inverseEntity="Conversation" syncable="YES"/>
  17. <relationship name="groupConversations" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Conversation" inverseName="members" inverseEntity="Conversation" syncable="YES"/>
  18. <relationship name="messages" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Message" inverseName="sender" inverseEntity="Message" syncable="YES"/>
  19. </entity>
  20. <entity name="Conversation" representedClassName="Conversation" syncable="YES">
  21. <attribute name="groupId" optional="YES" attributeType="Binary" syncable="YES"/>
  22. <attribute name="groupImageSetDate" optional="YES" transient="YES" attributeType="Date" syncable="YES"/>
  23. <attribute name="groupName" optional="YES" attributeType="String" syncable="YES"/>
  24. <attribute name="lastTypingStart" optional="YES" transient="YES" attributeType="Date" syncable="YES"/>
  25. <attribute name="typing" transient="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
  26. <attribute name="unreadMessageCount" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
  27. <relationship name="contact" optional="YES" maxCount="1" deletionRule="Nullify" destinationEntity="Contact" inverseName="conversations" inverseEntity="Contact" syncable="YES"/>
  28. <relationship name="groupImage" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="ImageData" syncable="YES"/>
  29. <relationship name="lastMessage" optional="YES" minCount="1" maxCount="1" deletionRule="Nullify" destinationEntity="Message" syncable="YES"/>
  30. <relationship name="members" optional="YES" toMany="YES" deletionRule="Nullify" destinationEntity="Contact" inverseName="groupConversations" inverseEntity="Contact" syncable="YES"/>
  31. <relationship name="messages" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="Message" inverseName="conversation" inverseEntity="Message" syncable="YES"/>
  32. </entity>
  33. <entity name="ImageData" representedClassName="ImageData" syncable="YES">
  34. <attribute name="data" attributeType="Binary" allowsExternalBinaryDataStorage="YES" syncable="YES"/>
  35. <attribute name="height" attributeType="Integer 16" defaultValueString="0" syncable="YES"/>
  36. <attribute name="width" attributeType="Integer 16" defaultValueString="0" syncable="YES"/>
  37. </entity>
  38. <entity name="ImageMessage" representedClassName="ImageMessage" parentEntity="Message" syncable="YES">
  39. <attribute name="encryptionKey" optional="YES" attributeType="Binary" syncable="YES"/>
  40. <attribute name="imageBlobId" optional="YES" attributeType="Binary" syncable="YES"/>
  41. <attribute name="imageNonce" optional="YES" attributeType="Binary" syncable="YES"/>
  42. <attribute name="imageSize" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
  43. <attribute name="progress" optional="YES" transient="YES" attributeType="Float" syncable="YES"/>
  44. <relationship name="image" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="ImageData" syncable="YES"/>
  45. <relationship name="thumbnail" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="ImageData" syncable="YES"/>
  46. </entity>
  47. <entity name="LocationMessage" representedClassName="LocationMessage" parentEntity="Message" syncable="YES">
  48. <attribute name="accuracy" optional="YES" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
  49. <attribute name="latitude" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
  50. <attribute name="longitude" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
  51. <attribute name="reverseGeocodingResult" optional="YES" attributeType="String" syncable="YES"/>
  52. </entity>
  53. <entity name="Message" representedClassName="BaseMessage" isAbstract="YES" syncable="YES">
  54. <attribute name="date" attributeType="Date" indexed="YES" syncable="YES"/>
  55. <attribute name="delivered" attributeType="Boolean" syncable="YES"/>
  56. <attribute name="deliveryDate" optional="YES" attributeType="Date" syncable="YES"/>
  57. <attribute name="id" attributeType="Binary" indexed="YES" syncable="YES"/>
  58. <attribute name="isOwn" attributeType="Boolean" indexed="YES" syncable="YES"/>
  59. <attribute name="read" attributeType="Boolean" indexed="YES" syncable="YES"/>
  60. <attribute name="readDate" optional="YES" attributeType="Date" syncable="YES"/>
  61. <attribute name="sendFailed" optional="YES" attributeType="Boolean" syncable="YES"/>
  62. <attribute name="sent" attributeType="Boolean" syncable="YES"/>
  63. <attribute name="userack" attributeType="Boolean" syncable="YES"/>
  64. <attribute name="userackDate" optional="YES" attributeType="Date" syncable="YES"/>
  65. <relationship name="conversation" minCount="1" maxCount="1" deletionRule="Nullify" destinationEntity="Conversation" inverseName="messages" inverseEntity="Conversation" syncable="YES"/>
  66. <relationship name="sender" optional="YES" minCount="1" maxCount="1" deletionRule="Nullify" destinationEntity="Contact" inverseName="messages" inverseEntity="Contact" syncable="YES"/>
  67. </entity>
  68. <entity name="TextMessage" representedClassName="TextMessage" parentEntity="Message" syncable="YES">
  69. <attribute name="text" attributeType="String" syncable="YES"/>
  70. </entity>
  71. <entity name="VideoData" representedClassName="VideoData" syncable="YES">
  72. <attribute name="data" attributeType="Binary" allowsExternalBinaryDataStorage="YES" syncable="YES"/>
  73. </entity>
  74. <entity name="VideoMessage" representedClassName="VideoMessage" parentEntity="Message" syncable="YES">
  75. <attribute name="duration" attributeType="Float" defaultValueString="0.0" syncable="YES"/>
  76. <attribute name="encryptionKey" optional="YES" attributeType="Binary" syncable="YES"/>
  77. <attribute name="progress" optional="YES" transient="YES" attributeType="Float" syncable="YES"/>
  78. <attribute name="videoBlobId" optional="YES" attributeType="Binary" syncable="YES"/>
  79. <attribute name="videoSize" optional="YES" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
  80. <relationship name="thumbnail" minCount="1" maxCount="1" deletionRule="Cascade" destinationEntity="ImageData" syncable="YES"/>
  81. <relationship name="video" optional="YES" maxCount="1" deletionRule="Cascade" destinationEntity="VideoData" syncable="YES"/>
  82. </entity>
  83. <elements>
  84. <element name="Contact" positionX="0" positionY="0" width="0" height="0"/>
  85. <element name="Conversation" positionX="0" positionY="0" width="0" height="0"/>
  86. <element name="ImageData" positionX="0" positionY="0" width="0" height="0"/>
  87. <element name="ImageMessage" positionX="0" positionY="0" width="0" height="0"/>
  88. <element name="LocationMessage" positionX="0" positionY="0" width="0" height="0"/>
  89. <element name="Message" positionX="0" positionY="0" width="0" height="0"/>
  90. <element name="TextMessage" positionX="0" positionY="0" width="0" height="0"/>
  91. <element name="VideoData" positionX="0" positionY="0" width="0" height="0"/>
  92. <element name="VideoMessage" positionX="0" positionY="0" width="0" height="0"/>
  93. </elements>
  94. </model>