Location: PHPKode > projects > Meeting Request Scheduling and Booking System > mrsbs/php/lib/database-schema.xml
<?xml version="1.0"?>
<schema version="0.3">

<!--

   // MRSBS database schema
   //
   // Version: $Revision: 1.6 $
   // Date: $Date: 2008/05/12 13:34:36 $
   //
   // Copyright (c) 2006 - 2008 Benjamin Oshrin
   // License restrictions apply, see LICENSE for details.

-->
  
<!-- MRSBS_MEETING_INFO -->

 <table name="mrsbs_meeting_info">
  <descr>Primary meeting information.</descr>

  <!-- We can't use AUTOINCREMENT here since we don't insert unique
       information when we insert a new row.  For consistency, we
       won't use it anywhere --> 
  <field name="mtgid" type="I">
   <descr>Meeting ID</descr>
   <KEY/>
  </field>
  
  <field name="contactid" type="I">
   <descr>Contact ID who owns this meeting</descr>
  </field>
  
  <field name="hostid" type="I">
   <descr>Contact ID who hosts this meeting</descr>
  </field>
  
  <field name="summary" type="C" SIZE="80">
   <descr>Summary</descr>
  </field>
  
  <field name="description" type="X" SIZE="800">
   <descr>Description</descr>
  </field>
  
  <field name="duration" type="I">
   <descr>Duration in minutes</descr>
  </field>
  
  <field name="replyby" type="T">
   <descr>Time to reply by</descr>
  </field>
  
  <field name="replybymode" type="C" SIZE="1">
   <descr>[W]ait to schedule until reply by time,
          schedule if all replies [R]eceived</descr>
  </field>
  
  <field name="scheduledfor" type="T">
   <descr>Time schedule for, once computed</descr>
  </field>
  
  <field name="locationid" type="I">
   <descr>Location ID for this meeting, (-1 for none, -2 for tbd)</descr>
  </field>
  
  <field name="locationstatus" type="C" SIZE="1">
   <descr>[T]entative, [C]onfirmed, [N]one</descr>
  </field>
  
  <field name="status" type="C" SIZE="1">
   <descr>[I]nvites sent, [S]cheduled, [B]uilding, [F]ailed to schedule,
     lowercase=canceled at x
   </descr>
  </field>

  <index name="mrsbs_meeting_info_i1">
   <col>contactid</col>
  </index>

  <index name="mrsbs_meeting_info_i2">
   <col>replyby</col>
  </index>

  <index name="mrsbs_meeting_info_i3">
   <col>status</col>
  </index>

  <index name="mrsbs_meeting_info_i4">
   <col>hostid</col>
  </index>

  <index name="mrsbs_meeting_info_i5">
   <col>replybymode</col>
  </index>

  <index name="mrsbs_meeting_info_i6">
   <col>summary</col>
  </index>

  <index name="mrsbs_meeting_info_i7">
   <col>description</col>
   <FULLTEXT/>
  </index>
 </table>

<!-- MRSBS_ACLS -->

 <table name="mrsbs_acls">
  <descr>Access Control Lists.</descr>
  
  <field name="resourcetype" type="C" SIZE="1">
   <descr>Resource type: [L]ocation</descr>
  </field>
  
  <field name="resourceid" type="I">
   <descr>Resource ID</descr>
  </field>
  
  <field name="acltype" type="C" SIZE="1">
   <descr>ACL type: [A]ll, [G]roup, [U]ser</descr>
  </field>
  
  <field name="who" type="C" SIZE="80">
   <descr>Who the ACL applies to (group name or contact ID)</descr>
  </field>
  
  <field name="perm" type="I">
   <descr>Permission value, where 0=denied</descr>
  </field>

  <index name="mrsbs_acls_i1">
   <col>resourcetype</col>
   <col>resourceid</col>
  </index>
 </table>
  
<!-- MRSBS_CONTACTS -->

 <table name="mrsbs_contacts">
  <descr>Contact cache.</descr>
  
  <field name="contactid" type="I">
   <descr>Contact ID</descr>
   <KEY/>
  </field>
  
  <field name="mail" type="C" SIZE="80">
   <descr>Email address</descr>
  </field>
    
  <field name="givenname" type="C" SIZE="80">
   <descr>Given Name</descr>
  </field>
    
  <field name="sn" type="C" SIZE="80">
   <descr>Surname</descr>
  </field>

  <index name="mrsbs_contacts_i1">
   <col>mail</col>
   <UNIQUE/>
  </index>

  <index name="mrsbs_contacts_i2">
   <col>givenname</col>
   <col>sn</col>
  </index>
 </table>

<!-- MRSBS_DELEGATES -->

 <table name="mrsbs_delegates">
  <descr>Permission delegation.</descr>
  
  <field name="contactid" type="I">
   <descr>Contact ID who is delegating</descr>
  </field>
  
  <field name="delegateid" type="I">
   <descr>Contact ID who is delegated to</descr>
  </field>

  <field name="pcreate" type="C" SIZE="1">
   <descr>Allow delegate to create meetings</descr>
  </field>

  <field name="preply" type="C" SIZE="1">
   <descr>Allow delegate to reply to meeting requests</descr>
  </field>

  <index name="mrsbs_delegates_i1">
   <col>delegateid</col>
  </index>

  <index name="mrsbs_delegates_i2">
   <col>contactid</col>
   <col>delegateid</col>
   <UNIQUE/>
  </index>
 </table>

<!-- MRSBS_HISTORY -->

 <table name="mrsbs_history">
  <descr>Operation history.</descr>
 
  <field name="mtgid" type="I">
   <descr>Meeting ID</descr>
  </field>
  
  <field name="contactid" type="I">
   <descr>Contact ID who triggered this operation</descr>
  </field>
  
  <field name="rtime" type="T">
   <descr>Time recorded</descr>
  </field>
  
  <field name="action" type="C" SIZE="4">
   <descr>Code for this action</descr>
  </field>

  <field name="description" type="C" SIZE="200">
   <descr>Description</descr>
  </field>
  
  <index name="mrsbs_history_i1">
   <col>mtgid</col>
  </index>
 </table>
  
<!-- MRSBS_INVITEES -->

 <table name="mrsbs_invitees">
  <descr>Invitees per meeting.</descr>

  <field name="inviteid" type="C" SIZE="40">
   <descr>Invite ID, a random string</descr>
   <KEY/>
  </field>
  
  <field name="mtgid" type="I">
   <descr>Meeting ID</descr>
  </field>
  
  <field name="contactid" type="I">
   <descr>Contact ID</descr>
  </field>
  
  <field name="status" type="C" SIZE="1">
   <descr>[R]equired, [O]ptional, [N]on-Attending</descr>
  </field>
  
  <field name="reply" type="C" SIZE="1">
   <descr>[A]ttending, [D]eclining, [N]one</descr>
  </field>

  <index name="mrsbs_invitees_i1">
   <col>mtgid</col>
  </index>

  <index name="mrsbs_invitees_i1">
   <col>contactid</col>
  </index>
 </table>

<!-- MRSBS_LOCATIONS -->

 <table name="mrsbs_locations">
  <descr>Defined meeting locations.</descr>

  <field name="locationid" type="I">
   <descr>Location ID</descr>
   <KEY/>
  </field>
  
  <field name="description" type="C" SIZE="80">
   <descr>Description</descr>
  </field>
  
  <field name="capacity" type="I">
   <descr>Location capacity</descr>
  </field>

  <field name="contactid" type="I">
   <descr>Contact ID who owns this location</descr>
  </field>

  <field name="system" type="C" SIZE="1">
   <descr>[I]nternal, [M]RBS</descr>
  </field>
  
  <index name="mrsbs_locations_i1">
   <col>contactid</col>
  </index>
 </table>

<!-- MRSBS_POTENTIAL_LOCATIONS -->

 <table name="mrsbs_potential_locations">
  <descr>Potential locations for a given meeting.</descr>

  <field name="locationid" type="I">
   <descr>Location ID</descr>
  </field>

  <field name="mtgid" type="I">
   <descr>Meeting ID</descr>
  </field>
 
  <field name="pref" type="I">
   <descr>Preference (0=unacceptable, 1=acceptable, 2=preferred)</descr>
  </field>
 
  <index name="mrsbs_potential_locations_i1">
   <col>locationid</col>
   <col>mtgid</col>
  </index>
 </table>

<!-- MRSBS_REPLY_LOCATIONS-->

 <table name="mrsbs_reply_locations">
  <descr>Location preferences from reply.</descr>

  <field name="inviteid" type="C" SIZE="40">
   <descr>Invite ID</descr>
  </field>
  
  <field name="locationid" type="I">
   <descr>Location ID</descr>
  </field>
 
  <field name="pref" type="I">
   <descr>Preference (0=unacceptable, 1=acceptable, 2=preferred)</descr>
  </field>
 
  <index name="mrsbs_reply_locations_i1">
   <col>inviteid</col>
  </index>
 </table>

<!-- MRSBS_REPLY_WINDOWS-->

 <table name="mrsbs_reply_windows">
  <descr>Time preferences from reply.</descr>

  <field name="inviteid" type="C" SIZE="40">
   <descr>Invite ID</descr>
  </field>

  <field name="status" type="C" SIZE="1">
   <descr>[p]referred, [a]vailable, not [P]referred, not [A]vailable</descr>
  </field>

  <field name="begin" type="T">
   <descr>Window begin time</descr>
  </field>

  <field name="end" type="T">
   <descr>Window end time</descr>
  </field>

  <index name="mrsbs_reply_locations_i1">
   <col>inviteid</col>
  </index>
 </table>

<!-- MRSBS_WINDOWS -->
<!-- this should really be called MRSBS_POTENTIAL_WINDOWS -->

 <table name="mrsbs_windows">
  <descr>Potential meeting windows.</descr>

  <field name="windowid" type="I">
   <descr>Window ID</descr>
   <KEY/>
  </field>
  
  <field name="mtgid" type="I">
   <descr>Meeting ID</descr>
  </field>

  <field name="pref" type="I">
   <descr>Preference (1=most preferred)</descr>
  </field>

  <field name="begin" type="T">
   <descr>Window begin time</descr>
  </field>

  <field name="end" type="T">
   <descr>Window end time</descr>
  </field>

  <index name="mrsbs_windows_i1">
   <col>mtgid</col>
  </index>
 </table>

<!-- MRSBS_RECENT_INVITEES -->

 <table name="mrsbs_recent_invitees">
  <descr>Recent invitees per contactid.</descr>

  <field name="contactid" type="I">
   <descr>Contact ID of the invitor</descr>
  </field>
  
  <field name="inviteeid" type="I">
   <descr>Contact ID of the invitee</descr>
  </field>

  <field name="lastinvite" type="T">
   <descr>Time of last invite</descr>
  </field>

  <index name="mrsbs_recent_invitees_i1">
   <col>contactid</col>
  </index>

  <index name="mrsbs_recent_invitees_i2">
   <col>contactid</col>
   <col>inviteeid</col>
   <UNIQUE/>
  </index>

  <index name="mrsbs_recent_invitees_i1">
   <col>lastinvite</col>
  </index>
 </table>
 
<!-- MRSBS_SESSION_INFO -->

 <table name="mrsbs_session_info">
  <desc>table for ADOdb session-management</desc>

  <field name="sesskey" type="C" size="64">
   <descr>session key</descr>
   <KEY/>
   <NOTNULL/>
   <DEFAULT></DEFAULT>
  </field>
 
  <field name="expiry" type="T">
   <descr></descr>
   <NOTNULL/>
  </field>

  <field name="expireref" type="C" size="250">
   <descr></descr>
   <DEFAULT></DEFAULT>
  </field>
 
  <field name="created" type="T">
   <descr></descr>
   <NOTNULL/>
  </field>

  <field name="modified" type="T">
   <descr></descr>
   <NOTNULL/>
  </field>

  <field name="sessdata" type="XL">
   <descr></descr>
   <NOTNULL/>
   <DEFAULT></DEFAULT>
  </field>

  <index name="mrsbs_session_info_s1">
   <col>expiry</col>
  </index>

  <index name="mrsbs_session_info_s2">
   <col>expireref</col>
  </index>
 </table>

</schema>
Return current item: Meeting Request Scheduling and Booking System