<?xml version="1.0"?>
<glom_document xmlns="http://glom.org/glom_document" format_version="4" translation_original_locale="C" database_title="Ruthven2" is_example="true">
  <connection hosting_mode="postgres_self" server="localhost" try_other_ports="false" database="glom_ruthven" port="5433"/>
  <table name="availability" overview_x="10" overview_y="10" title="Availability">
    <example_rows>
      <example_row>
        <value column="availability_id">0</value>
        <value column="start">09:00:00</value>
        <value column="people_id">2</value>
        <value column="days_id">5</value>
        <value column="finish">17:00:00</value>
        <value column="created"/>
      </example_row>
      <example_row>
        <value column="availability_id">1</value>
        <value column="start">12:00:00</value>
        <value column="people_id">1</value>
        <value column="days_id">3</value>
        <value column="finish">14:00:00</value>
        <value column="created"/>
      </example_row>
      <example_row>
        <value column="availability_id">2</value>
        <value column="start">09:00:00</value>
        <value column="people_id">1</value>
        <value column="days_id">0</value>
        <value column="finish">17:00:00</value>
        <value column="created"/>
      </example_row>
      <example_row>
        <value column="availability_id">3</value>
        <value column="start">13:00:00</value>
        <value column="people_id">0</value>
        <value column="days_id">7</value>
        <value column="finish">17:00:00</value>
        <value column="created"/>
      </example_row>
      <example_row>
        <value column="availability_id">4</value>
        <value column="start">13:00:00</value>
        <value column="people_id">3</value>
        <value column="days_id">4</value>
        <value column="finish">20:00:00</value>
        <value column="created"/>
      </example_row>
      <example_row>
        <value column="availability_id">5</value>
        <value column="start">19:00:00</value>
        <value column="people_id">3</value>
        <value column="days_id">3</value>
        <value column="finish">23:00:00</value>
        <value column="created"/>
      </example_row>
      <example_row>
        <value column="availability_id">6</value>
        <value column="start">19:00:00</value>
        <value column="people_id">3</value>
        <value column="days_id">6</value>
        <value column="finish">23:00:00</value>
        <value column="created"/>
      </example_row>
    </example_rows>
    <trans_set>
      <trans loc="en_NZ" val="Availability"/>
      <trans loc="en_US" val="Availability"/>
    </trans_set>
    <title_singular/>
    <fields>
      <field name="availability_id" primary_key="true" auto_increment="true" type="Number" title="availability ID">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2"/>
      </field>
      <field name="start" type="Time" title="Start">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2"/>
      </field>
      <field name="people_id" type="Number" title="PeopleID">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2"/>
      </field>
      <field name="days_id" type="Number" title="DaysID">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2" choices_related="true" choices_related_relationship="days" choices_related_field="days_id" choices_related_second="day"/>
        <trans_set>
          <trans loc="en_US" val="DaysID"/>
        </trans_set>
      </field>
      <field name="finish" type="Time" title="Finish">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2"/>
      </field>
      <field name="created" type="Date">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2"/>
        <trans_set>
          <trans loc="en_NZ" val="Created"/>
        </trans_set>
      </field>
    </fields>
    <relationships>
      <relationship name="people" key="people_id" other_table="people" other_key="people_id" title="People">
        <trans_set>
          <trans loc="en_US" val="People"/>
        </trans_set>
        <title_singular/>
      </relationship>
      <relationship name="days" key="days_id" other_table="days" other_key="days_id" title="Days">
        <trans_set>
          <trans loc="en_US" val="Days"/>
        </trans_set>
        <title_singular/>
      </relationship>
    </relationships>
    <data_layouts>
      <data_layout name="list" parent_table="availability">
        <data_layout_groups>
          <data_layout_group name="main">
            <data_layout_item name="availability_id" editable="true" use_default_formatting="true" column_width="101">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="days_id" editable="true" use_default_formatting="true" column_width="69">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="people_id" editable="true" use_default_formatting="true" column_width="108">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="start" editable="true" use_default_formatting="true" column_width="82">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="finish" editable="true" use_default_formatting="true" column_width="97">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="name" relationship="people" editable="true" use_default_formatting="true" column_width="137">
              <formatting format_thousands_separator="true" format_decimal_places="2" format_text_multiline_height_lines="6"/>
            </data_layout_item>
            <data_layout_item name="day" relationship="days" editable="true" use_default_formatting="true" column_width="97">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
          </data_layout_group>
        </data_layout_groups>
      </data_layout>
      <data_layout name="details" parent_table="availability">
        <data_layout_groups>
          <data_layout_group name="main">
            <data_layout_item name="days_id" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="people_id" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="start" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="finish" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="name" relationship="people" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2" format_text_multiline_height_lines="6"/>
            </data_layout_item>
            <data_layout_item name="day" relationship="days" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
          </data_layout_group>
        </data_layout_groups>
      </data_layout>
    </data_layouts>
    <reports/>
    <print_layouts/>
  </table>
  <table name="days" overview_x="356" overview_y="374" title="Days">
    <example_rows>
      <example_row>
        <value column="days_id">0</value>
        <value column="day">2009-12-01</value>
      </example_row>
      <example_row>
        <value column="days_id">3</value>
        <value column="day">2009-12-12</value>
      </example_row>
      <example_row>
        <value column="days_id">4</value>
        <value column="day">2009-12-24</value>
      </example_row>
      <example_row>
        <value column="days_id">5</value>
        <value column="day">2009-12-15</value>
      </example_row>
      <example_row>
        <value column="days_id">6</value>
        <value column="day">2009-12-25</value>
      </example_row>
      <example_row>
        <value column="days_id">7</value>
        <value column="day">2009-12-25</value>
      </example_row>
    </example_rows>
    <trans_set>
      <trans loc="en_NZ" val="Days"/>
      <trans loc="en_US" val="Days"/>
    </trans_set>
    <title_singular/>
    <fields>
      <field name="days_id" primary_key="true" auto_increment="true" type="Number" title="ID">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2"/>
      </field>
      <field name="day" type="Date" title="Day">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2"/>
      </field>
    </fields>
    <relationships/>
    <data_layouts>
      <data_layout name="list" parent_table="days">
        <data_layout_groups>
          <data_layout_group name="main">
            <data_layout_item name="days_id" editable="true" use_default_formatting="true" column_width="40">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="day" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
          </data_layout_group>
        </data_layout_groups>
      </data_layout>
      <data_layout name="details" parent_table="days">
        <data_layout_groups>
          <data_layout_group name="main">
            <data_layout_item name="days_id" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="day" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
          </data_layout_group>
        </data_layout_groups>
      </data_layout>
    </data_layouts>
    <reports/>
    <print_layouts/>
  </table>
  <table name="people" default="true" overview_x="430" overview_y="10" title="People">
    <example_rows>
      <example_row>
        <value column="people_id">0</value>
        <value column="name">Anton</value>
      </example_row>
      <example_row>
        <value column="people_id">1</value>
        <value column="name">Berta</value>
      </example_row>
      <example_row>
        <value column="people_id">2</value>
        <value column="name">Cesar</value>
      </example_row>
      <example_row>
        <value column="people_id">3</value>
        <value column="name">Dora</value>
      </example_row>
    </example_rows>
    <trans_set>
      <trans loc="en_NZ" val="People"/>
      <trans loc="en_US" val="People"/>
    </trans_set>
    <title_singular/>
    <fields>
      <field name="people_id" primary_key="true" auto_increment="true" type="Number" title="ID">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2"/>
      </field>
      <field name="name" type="Text" title="Name">
        <calculation/>
        <formatting format_thousands_separator="true" format_decimal_places="2" format_text_multiline_height_lines="6"/>
      </field>
    </fields>
    <relationships>
      <relationship name="avail" key="people_id" other_table="availability" other_key="people_id" title="Avail">
        <trans_set>
          <trans loc="en_US" val="Avail"/>
        </trans_set>
        <title_singular/>
      </relationship>
    </relationships>
    <data_layouts>
      <data_layout name="list" parent_table="people">
        <data_layout_groups>
          <data_layout_group name="main">
            <data_layout_item name="people_id" editable="true" use_default_formatting="true" column_width="105">
              <formatting format_thousands_separator="true" format_decimal_places="2"/>
            </data_layout_item>
            <data_layout_item name="name" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2" format_text_multiline_height_lines="6"/>
            </data_layout_item>
          </data_layout_group>
        </data_layout_groups>
      </data_layout>
      <data_layout name="details" parent_table="people">
        <data_layout_groups>
          <data_layout_group name="main">
            <data_layout_item name="name" editable="true" use_default_formatting="true">
              <formatting format_thousands_separator="true" format_decimal_places="2" format_text_multiline_height_lines="6"/>
            </data_layout_item>
            <data_layout_portal relationship="avail" row_height="20">
              <portal_navigation_relationship navigation_type="none"/>
              <data_layout_item name="days_id" use_default_formatting="true" column_width="90">
                <formatting format_thousands_separator="true" format_decimal_places="2"/>
              </data_layout_item>
              <data_layout_item name="day" relationship="days" use_default_formatting="true" column_width="125">
                <formatting format_thousands_separator="true" format_decimal_places="2"/>
              </data_layout_item>
              <data_layout_item name="start" use_default_formatting="true" column_width="97">
                <formatting format_thousands_separator="true" format_decimal_places="2"/>
              </data_layout_item>
              <data_layout_item name="finish" use_default_formatting="true" column_width="133">
                <formatting format_thousands_separator="true" format_decimal_places="2"/>
              </data_layout_item>
            </data_layout_portal>
          </data_layout_group>
        </data_layout_groups>
      </data_layout>
    </data_layouts>
    <reports/>
    <print_layouts/>
  </table>
  <groups><!--These are only used when recreating a database from an example file. The actual access-control is on the server, of course.-->
    <group name="glom_developer" developer="true"/>
  </groups>
  <library_modules/></glom_document>
