<!--
		SIF Implementation Specification (New Zealand) 3.1
		(8 December, 2020
)
		
		Infrastructure Version: v3.1
	-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.sifassociation.org/datamodel/nz/3.1" targetNamespace="http://www.sifassociation.org/datamodel/nz/3.1" elementFormDefault="qualified" version="3.1 (rc 5)">
  <xs:complexType name="StaffAssignmentType">
    <xs:sequence>
      <xs:element name="StaffAssignmentRefId" minOccurs="0" nillable="true" type="RefIdType" />
      <xs:element name="StaffAssignmentLocalId" minOccurs="0" nillable="true" type="LocalIdType" />
      <xs:element name="StaffAssignmentStatus" minOccurs="0" type="NZCodeSetsStaffAssignmentStatusType" />
      <xs:element name="StaffMember" minOccurs="0" type="ObjectReferenceType" />
      <xs:element name="AssignedLocation" minOccurs="0" type="ProviderObjectReferenceType" />
      <xs:element name="EmployingOrAccommodatingProvider" minOccurs="0" nillable="true" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="Description" minOccurs="0" nillable="true" type="xs:normalizedString" />
      <xs:element name="StaffRole" minOccurs="0" type="NZCodeSetsStaffRoleType" />
      <xs:element name="StartDate" minOccurs="0" type="xs:date" />
      <xs:element name="EndDate" minOccurs="0" nillable="true" type="xs:date" />
      <xs:element name="CasualReliefTeacher" minOccurs="0" type="NZCodeSetsYesOrNoCategoryType" />
      <xs:element name="EmploymentStatus" minOccurs="0" nillable="true" type="NZCodeSetsStaffStatusType" />
      <xs:element name="StaffSubjectList" minOccurs="0" nillable="true" type="StaffSubjectListType" />
      <xs:element name="YearLevels" minOccurs="0" nillable="true" type="YearLevelListType" />
      <xs:element name="RecordAudit" minOccurs="0" nillable="true" type="RecordAuditType" />
    </xs:sequence>
  </xs:complexType>

  <xs:element name="StaffAssignment" type="StaffAssignmentType">
    <xs:unique name="StaffAssignmentKey1">
      <xs:selector xpath="." />
      <xs:field xpath="./StaffAssignmentRefId" />
    </xs:unique>
  </xs:element>

  <xs:complexType name="StaffAssignmentCollectionType">
    <xs:sequence>
      <xs:element name="StaffAssignment" type="StaffAssignmentType" minOccurs="0" maxOccurs="unbounded" />
    </xs:sequence>
  </xs:complexType>
  <xs:element name="StaffAssignments" type="StaffAssignmentCollectionType" />

</xs:schema>