<?xml version="1.0" encoding="utf-8"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            xmlns:tlp="http://www.timelog.com/XML/Schema/tlp/v4_4"
            targetNamespace="http://www.timelog.com/XML/Schema/tlp/v4_4"
            elementFormDefault="qualified"
            attributeFormDefault="unqualified">
  <xsd:element name="Allocations">
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element name="Allocation" type="tlp:AllocationRaw_Type" minOccurs="0" maxOccurs="unbounded" />
      </xsd:sequence>
    </xsd:complexType>
    <xsd:key name="Allocation_Key">
      <xsd:selector xpath=".//tlp:Allocation" />
      <xsd:field xpath="@ID" />
    </xsd:key>
  </xsd:element>

  <xsd:complexType name="AllocationRaw_Type">
    <xsd:sequence>
      <xsd:element name="ProjectID" type="xsd:positiveInteger" />
      <xsd:element name="TaskID" type="xsd:positiveInteger" />
      <xsd:element name="EmployeeID" type="xsd:positiveInteger" />
      <xsd:element name="AllocatedHours" type="xsd:decimal" />
      <xsd:element name="HourlyRate" type="xsd:decimal" />
      <xsd:element name="TaskIsFixedPrice" type="xsd:boolean" />
      <xsd:element name="IsActive" type="xsd:boolean" />
      <xsd:element name="StartsAt" type="xsd:dateTime" />
      <xsd:element name="EndsAt" type="xsd:dateTime" />
    </xsd:sequence>
    <xsd:attribute name="ID" type="xsd:positiveInteger" use="required" />
  </xsd:complexType>
</xsd:schema>
