<!DOCTYPE maps SYSTEM "../../../lib/tools/dtd/MapsDefinition2.0.dtd">
<maps>
  <map>
    <map-name>RatingMap</map-name>
    <schema>
      <schema-major>1</schema-major>
      <schema-minor>0</schema-minor>
    </schema>
    <member>
      <member-name>ratingId</member-name>
      <member-type>INTEGER</member-type>
      <primary/>
    </member>
    <member>
      <member-name>itemId</member-name>
      <member-type>INTEGER</member-type>
      <indexed/>
      <required/>
    </member>
    <member>
      <member-name>userId</member-name>
      <member-type>INTEGER</member-type>
      <required/>
    </member>
    <member>
      <member-name>rating</member-name>
      <member-type>INTEGER</member-type>
      <required/>
    </member>
    <member>
      <member-name>sessionId</member-name>
      <member-type>STRING</member-type>
      <member-size>MEDIUM</member-size>
    </member>
    <member>
      <member-name>remoteIdentifier</member-name>
      <member-type>STRING</member-type>
      <member-size>LARGE</member-size>
    </member>
    <index>
      <member-name>itemId</member-name>
      <member-name>userId</member-name>
    </index>
    <index>
      <member-name>itemId</member-name>
      <member-name>remoteIdentifier</member-name>
    </index>
  </map>
  <map>
    <map-name>RatingCacheMap</map-name>
    <schema>
      <schema-major>1</schema-major>
      <schema-minor>0</schema-minor>
    </schema>
    <member>
      <member-name>itemId</member-name>
      <member-type>INTEGER</member-type>
      <primary/>
    </member>
    <member>
      <member-name>averageRating</member-name>
      <member-type>INTEGER</member-type>
      <required/>
    </member>
    <member>
      <member-name>voteCount</member-name>
      <member-type>INTEGER</member-type>
      <required/>
    </member>
  </map>
</maps>
