<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://dtd.riege.com/scope/webservices/salesperson-v1"
            xmlns:cdt="http://dtd.riege.com/scope/webservices/commonDataTypes-v1"
            xmlns:xsd="http://www.w3.org/2001/XMLSchema"
            targetNamespace="http://dtd.riege.com/scope/webservices/salesperson-v1"
            elementFormDefault="qualified"
            version="1.0">

    <xsd:annotation>
        <xsd:appinfo>
            <lastChangeDate>2026-05-12</lastChangeDate>
            <version>1.0.1</version>
        </xsd:appinfo>
    </xsd:annotation>

    <xsd:import namespace="http://dtd.riege.com/scope/webservices/commonDataTypes-v1"
                schemaLocation="commonDataTypes-v1.xsd"/>

    <xsd:element name="salesperson" type="salespersonType">
        <xsd:annotation>
            <xsd:documentation>Root element holding a single salesperson</xsd:documentation>
        </xsd:annotation>
    </xsd:element>

    <xsd:element name="salespersons">
        <xsd:annotation>
            <xsd:documentation>Root element holding a list of salespersons</xsd:documentation>
        </xsd:annotation>
        <xsd:complexType>
            <xsd:sequence>
                <xsd:element name="salesperson" type="salespersonType" minOccurs="0"
                             maxOccurs="unbounded"/>
            </xsd:sequence>
        </xsd:complexType>
    </xsd:element>

    <xsd:complexType name="salespersonType">
        <xsd:annotation>
            <xsd:documentation>Salesperson data type</xsd:documentation>
        </xsd:annotation>
        <xsd:sequence>
            <xsd:element name="identifier" type="cdt:userIdType">
                <xsd:annotation>
                    <xsd:documentation>Salesperson identifier</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="lastModified" type="xsd:dateTime">
                <xsd:annotation>
                    <xsd:documentation>Last modification time of the sales person in UTC
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="deleted" type="xsd:boolean"/>

            <xsd:element name="name" type="cdt:string100Type">
                <xsd:annotation>
                    <xsd:documentation>The name of the salesperson</xsd:documentation>
                </xsd:annotation>
            </xsd:element>
            <xsd:element name="accountingCode" type="cdt:string32Type" minOccurs="0">
                <xsd:annotation>
                    <xsd:documentation>Code to be passed on to the accounting system
                    </xsd:documentation>
                </xsd:annotation>
            </xsd:element>
        </xsd:sequence>
    </xsd:complexType>

</xsd:schema>
