<?xml version="1.0" encoding="utf-8"?>
<edmx:Edmx Version="4.0" xmlns:edmx="http://docs.oasis-open.org/odata/ns/edmx">
  <edmx:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/Common.xml">
    <edmx:Include Alias="Common" Namespace="com.sap.vocabularies.Common.v1"/>
  </edmx:Reference>
  <edmx:Reference Uri="https://oasis-tcs.github.io/odata-vocabularies/vocabularies/Org.OData.Core.V1.xml">
    <edmx:Include Alias="Core" Namespace="Org.OData.Core.V1"/>
  </edmx:Reference>
  <edmx:DataServices>
    <Schema Namespace="InvoiceService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
      <Annotation Term="Core.Links">
        <Collection>
          <Record>
            <PropertyValue Property="rel" String="author"/>
            <PropertyValue Property="href" String="https://cap.cloud.sap"/>
          </Record>
        </Collection>
      </Annotation>
      <EntityContainer Name="EntityContainer">
        <EntitySet Name="Invoices" EntityType="InvoiceService.Invoices"/>
        <ActionImport Name="createInvoice" Action="InvoiceService.createInvoice"/>
        <ActionImport Name="updateInvoice" Action="InvoiceService.updateInvoice"/>
        <ActionImport Name="deleteInvoice" Action="InvoiceService.deleteInvoice"/>
        <ActionImport Name="getInvoice" Action="InvoiceService.getInvoice" EntitySet="Invoices"/>
        <ActionImport Name="getAllInvoices" Action="InvoiceService.getAllInvoices" EntitySet="Invoices"/>
      </EntityContainer>
      <EntityType Name="Invoices">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="invoiceNumber" Type="Edm.String" MaxLength="100"/>
        <Property Name="applicationId" Type="Edm.String" MaxLength="100"/>
        <Property Name="amount" Type="Edm.Decimal" Precision="15" Scale="2"/>
        <Property Name="currency" Type="Edm.String" MaxLength="3"/>
        <Property Name="invoiceDate" Type="Edm.Date"/>
        <Property Name="dueDate" Type="Edm.Date"/>
        <Property Name="status" Type="Edm.String" MaxLength="50"/>
        <Property Name="filePath" Type="Edm.String" MaxLength="255"/>
        <Property Name="notes" Type="Edm.String" MaxLength="1000"/>
        <Property Name="createdAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="updatedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="agencyID" Type="Edm.Guid"/>
      </EntityType>
      <ComplexType Name="return_InvoiceService_createInvoice">
        <Property Name="success" Type="Edm.Boolean"/>
        <Property Name="message" Type="Edm.String"/>
      </ComplexType>
      <ComplexType Name="return_InvoiceService_updateInvoice">
        <Property Name="success" Type="Edm.Boolean"/>
        <Property Name="message" Type="Edm.String"/>
      </ComplexType>
      <ComplexType Name="return_InvoiceService_deleteInvoice">
        <Property Name="success" Type="Edm.Boolean"/>
        <Property Name="message" Type="Edm.String"/>
      </ComplexType>
      <Action Name="createInvoice" IsBound="false">
        <Parameter Name="invoiceNumber" Type="Edm.String"/>
        <Parameter Name="applicationId" Type="Edm.String"/>
        <Parameter Name="amount" Type="Edm.Decimal" Scale="variable"/>
        <Parameter Name="currency" Type="Edm.String"/>
        <Parameter Name="invoiceDate" Type="Edm.Date"/>
        <Parameter Name="dueDate" Type="Edm.Date"/>
        <Parameter Name="status" Type="Edm.String"/>
        <Parameter Name="filePath" Type="Edm.String"/>
        <Parameter Name="notes" Type="Edm.String"/>
        <Parameter Name="agencyID" Type="Edm.Guid"/>
        <ReturnType Type="InvoiceService.return_InvoiceService_createInvoice"/>
      </Action>
      <Action Name="updateInvoice" IsBound="false">
        <Parameter Name="ID" Type="Edm.String"/>
        <Parameter Name="invoiceNumber" Type="Edm.String"/>
        <Parameter Name="applicationId" Type="Edm.String"/>
        <Parameter Name="amount" Type="Edm.Decimal" Scale="variable"/>
        <Parameter Name="currency" Type="Edm.String"/>
        <Parameter Name="invoiceDate" Type="Edm.Date"/>
        <Parameter Name="dueDate" Type="Edm.Date"/>
        <Parameter Name="status" Type="Edm.String"/>
        <Parameter Name="filePath" Type="Edm.String"/>
        <Parameter Name="notes" Type="Edm.String"/>
        <Parameter Name="agencyID" Type="Edm.Guid"/>
        <Parameter Name="updatedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <ReturnType Type="InvoiceService.return_InvoiceService_updateInvoice"/>
      </Action>
      <Action Name="deleteInvoice" IsBound="false">
        <Parameter Name="ID" Type="Edm.String"/>
        <ReturnType Type="InvoiceService.return_InvoiceService_deleteInvoice"/>
      </Action>
      <Action Name="getInvoice" IsBound="false">
        <Parameter Name="ID" Type="Edm.String"/>
        <ReturnType Type="InvoiceService.Invoices"/>
      </Action>
      <Action Name="getAllInvoices" IsBound="false">
        <ReturnType Type="Collection(InvoiceService.Invoices)"/>
      </Action>
      <Annotations Target="InvoiceService.Invoices/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="InvoiceService.Invoices/createdAt">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>