<?xml version="1.0"?>
<schema version="0.2">
  <table name="calendar">
    <field name="id" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="id_class" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="id_scheduling" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="date" type="T">
    </field>
    <field name="userid" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="id_appt_type" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="id_location_type" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="subject_summ" type="C" size="255">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
    <field name="subject" type="X">
    </field>
    <field name="location" type="C" size="100">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
    <field name="private" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="duration" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="availability" type="I">
    </field>
    <field name="telephone" type="C" size="20">
    </field>
    <field name="external" type="C" size="200">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
    <field name="inituserid" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="day_ind" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="repeat_mode" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="rep_from" type="T">
    </field>
    <field name="rep_until" type="T">
    </field>
    <field name="dategroup_id" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="holiday_id" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>

<table name="calendar_tmp">
    <field name="id" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="id_class" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="id_scheduling" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="date" type="T">
    </field>
    <field name="userid" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="id_appt_type" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="id_location_type" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="subject_summ" type="C" size="255">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
    <field name="subject" type="X">
    </field>
    <field name="location" type="C" size="100">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
    <field name="private" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="duration" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="availability" type="I">
    </field>
    <field name="telephone" type="C" size="20">
    </field>
    <field name="external" type="C" size="200">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
    <field name="inituserid" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="day_ind" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="repeat_mode" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="rep_from" type="T">
    </field>
    <field name="rep_until" type="T">
    </field>
    <field name="dategroup_id" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="holiday_id" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>

  <table name="calendar_appt_type">
    <field name="id" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="type" type="C" size="255">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
    <field name="color" type="C" size="255">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
  </table>

  <table name="calendar_class">
    <field name="id" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="class" type="C" size="255">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
    <field name="color" type="C" size="255">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
  </table>

  <table name="calendar_location_type">
    <field name="id" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="location_type" type="C" size="255">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
  </table>

  <table name="calendar_rights">
    <field name="id_owner" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="id_user" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="modify" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="view_all" type="I">
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
  </table>

  <table name="calendar_scheduling_type">
    <field name="id" type="I">
      <KEY/>
	  <NOTNULL/>
      <DEFAULT value="0"/>
    </field>
    <field name="type" type="C" size="255">
	  <NOTNULL/>
      <DEFAULT value=""/>
    </field>
  </table>


  <mgw>
	<moduleDefinition>
		<module>
			<module_type>3</module_type>
			<name>calendar</name>
			<version>0.81</version>
			<date>2006-04-16</date>
			<author>Matthieu PAINEAU</author>
			<email>matthieu.paineau@wanadoo.fr</email>
			<description>Calendar with different view like day/week/month, making appointments with other people...</description>
			<compatibility>0.6.9</compatibility>
			<dependancies>
				<dependancy>contact</dependancy>
			</dependancies>
			<secure>true</secure>
		</module>
	</moduleDefinition>
  </mgw>
</schema>

