contents 6.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667
  1. <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
  2. <model name="" userDefinedModelVersionIdentifier="" type="com.apple.IDECoreDataModeler.DataModel" documentVersion="1.0" lastSavedToolsVersion="1811" systemVersion="12C60" 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="sortIndex" optional="YES" attributeType="Integer 32" defaultValueString="0" indexed="YES" syncable="YES"/>
  11. <attribute name="sortInitial" optional="YES" attributeType="String" syncable="YES"/>
  12. <attribute name="verificationLevel" attributeType="Integer 16" syncable="YES"/>
  13. <attribute name="verifiedEmail" optional="YES" attributeType="String" syncable="YES"/>
  14. <attribute name="verifiedMobileNo" optional="YES" attributeType="String" syncable="YES"/>
  15. <relationship name="conversations" optional="YES" toMany="YES" deletionRule="Cascade" destinationEntity="Conversation" inverseName="contact" inverseEntity="Conversation" syncable="YES"/>
  16. </entity>
  17. <entity name="Conversation" representedClassName="Conversation" syncable="YES">
  18. <attribute name="lastTypingStart" optional="YES" transient="YES" attributeType="Date" syncable="YES"/>
  19. <attribute name="typing" transient="YES" attributeType="Boolean" defaultValueString="NO" syncable="YES"/>
  20. <attribute name="unreadMessageCount" attributeType="Integer 32" defaultValueString="0" syncable="YES"/>
  21. <relationship name="contact" minCount="1" maxCount="1" deletionRule="Nullify" destinationEntity="Contact" inverseName="conversations" inverseEntity="Contact" syncable="YES"/>
  22. <relationship name="lastMessage" optional="YES" minCount="1" maxCount="1" deletionRule="Nullify" destinationEntity="Message" syncable="YES"/>
  23. <relationship name="messages" optional="YES" toMany="YES" deletionRule="Cascade" ordered="YES" destinationEntity="Message" inverseName="conversation" inverseEntity="Message" syncable="YES"/>
  24. </entity>
  25. <entity name="ImageData" representedClassName="ImageData" syncable="YES">
  26. <attribute name="data" attributeType="Binary" allowsExternalBinaryDataStorage="YES" syncable="YES"/>
  27. <attribute name="height" attributeType="Integer 16" defaultValueString="0" syncable="YES"/>
  28. <attribute name="width" attributeType="Integer 16" defaultValueString="0" syncable="YES"/>
  29. </entity>
  30. <entity name="ImageMessage" representedClassName="ImageMessage" parentEntity="Message" syncable="YES">
  31. <attribute name="sendProgress" optional="YES" transient="YES" attributeType="Float" defaultValueString="0" syncable="YES"/>
  32. <relationship name="image" minCount="1" maxCount="1" deletionRule="Cascade" destinationEntity="ImageData" syncable="YES"/>
  33. <relationship name="thumbnail" minCount="1" maxCount="1" deletionRule="Cascade" destinationEntity="ImageData" syncable="YES"/>
  34. </entity>
  35. <entity name="LocationMessage" representedClassName="LocationMessage" parentEntity="Message" syncable="YES">
  36. <attribute name="accuracy" optional="YES" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
  37. <attribute name="latitude" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
  38. <attribute name="longitude" attributeType="Double" defaultValueString="0.0" syncable="YES"/>
  39. <attribute name="reverseGeocodingResult" optional="YES" attributeType="String" syncable="YES"/>
  40. </entity>
  41. <entity name="Message" representedClassName="BaseMessage" isAbstract="YES" syncable="YES">
  42. <attribute name="date" attributeType="Date" indexed="YES" syncable="YES"/>
  43. <attribute name="delivered" attributeType="Boolean" syncable="YES"/>
  44. <attribute name="deliveryDate" optional="YES" attributeType="Date" syncable="YES"/>
  45. <attribute name="id" attributeType="Binary" indexed="YES" syncable="YES"/>
  46. <attribute name="isOwn" attributeType="Boolean" syncable="YES"/>
  47. <attribute name="read" attributeType="Boolean" syncable="YES"/>
  48. <attribute name="readDate" optional="YES" attributeType="Date" syncable="YES"/>
  49. <attribute name="sendFailed" optional="YES" attributeType="Boolean" syncable="YES"/>
  50. <attribute name="sent" attributeType="Boolean" syncable="YES"/>
  51. <attribute name="userack" attributeType="Boolean" syncable="YES"/>
  52. <attribute name="userackDate" optional="YES" attributeType="Date" syncable="YES"/>
  53. <relationship name="conversation" minCount="1" maxCount="1" deletionRule="Nullify" destinationEntity="Conversation" inverseName="messages" inverseEntity="Conversation" syncable="YES"/>
  54. </entity>
  55. <entity name="TextMessage" representedClassName="TextMessage" parentEntity="Message" syncable="YES">
  56. <attribute name="text" attributeType="String" syncable="YES"/>
  57. </entity>
  58. <elements>
  59. <element name="Contact" positionX="0" positionY="0" width="128" height="225"/>
  60. <element name="Conversation" positionX="0" positionY="0" width="128" height="135"/>
  61. <element name="ImageData" positionX="160" positionY="192" width="128" height="90"/>
  62. <element name="ImageMessage" positionX="0" positionY="0" width="128" height="90"/>
  63. <element name="LocationMessage" positionX="160" positionY="192" width="128" height="105"/>
  64. <element name="Message" positionX="0" positionY="0" width="128" height="225"/>
  65. <element name="TextMessage" positionX="0" positionY="0" width="128" height="60"/>
  66. </elements>
  67. </model>