<?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="ReceiptFraudService" 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">
        <FunctionImport Name="getPendingExpenseReceipts" Function="ReceiptFraudService.getPendingExpenseReceipts"/>
        <FunctionImport Name="downloadExpenseReceipt" Function="ReceiptFraudService.downloadExpenseReceipt"/>
        <ActionImport Name="verifyReceipt" Action="ReceiptFraudService.verifyReceipt"/>
      </EntityContainer>
      <ComplexType Name="PendingExpenseReceiptCollection">
        <Property Name="totalRecords" Type="Edm.Int32"/>
        <Property Name="top" Type="Edm.Int32"/>
        <Property Name="skip" Type="Edm.Int32"/>
        <Property Name="expenses" Type="Collection(ReceiptFraudService.PendingExpenseReceipt)" Nullable="true"/>
      </ComplexType>
      <ComplexType Name="PendingExpenseReceipt">
        <Property Name="concurUserId" Type="Edm.String"/>
        <Property Name="userName" Type="Edm.String"/>
        <Property Name="employeeNumber" Type="Edm.String"/>
        <Property Name="firstName" Type="Edm.String"/>
        <Property Name="lastName" Type="Edm.String"/>
        <Property Name="displayName" Type="Edm.String"/>
        <Property Name="email" Type="Edm.String"/>
        <Property Name="activeUser" Type="Edm.Boolean"/>
        <Property Name="reportId" Type="Edm.String"/>
        <Property Name="reportName" Type="Edm.String"/>
        <Property Name="reportTotal" Type="Edm.Decimal" Scale="variable"/>
        <Property Name="reportCurrency" Type="Edm.String"/>
        <Property Name="reportDate" Type="Edm.Date"/>
        <Property Name="submitDate" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="approvalStatusCode" Type="Edm.String"/>
        <Property Name="approvalStatusName" Type="Edm.String"/>
        <Property Name="expenseId" Type="Edm.String"/>
        <Property Name="expenseTypeId" Type="Edm.String"/>
        <Property Name="expenseTypeName" Type="Edm.String"/>
        <Property Name="claimedAmount" Type="Edm.Decimal" Scale="variable"/>
        <Property Name="approvedAmount" Type="Edm.Decimal" Scale="variable"/>
        <Property Name="currencyCode" Type="Edm.String"/>
        <Property Name="transactionDate" Type="Edm.Date"/>
        <Property Name="vendorId" Type="Edm.String"/>
        <Property Name="vendorName" Type="Edm.String"/>
        <Property Name="vendorDescription" Type="Edm.String"/>
        <Property Name="locationId" Type="Edm.String"/>
        <Property Name="locationName" Type="Edm.String"/>
        <Property Name="locationCity" Type="Edm.String"/>
        <Property Name="locationCountryCode" Type="Edm.String"/>
        <Property Name="businessPurpose" Type="Edm.String"/>
        <Property Name="receiptImageId" Type="Edm.String"/>
        <Property Name="receiptImageUrl" Type="Edm.String"/>
        <Property Name="ereceiptImageId" Type="Edm.String"/>
        <Property Name="hasReceiptImage" Type="Edm.Boolean"/>
        <Property Name="hasMissingReceiptDeclaration" Type="Edm.Boolean"/>
        <Property Name="verificationStatus" Type="Edm.String"/>
        <Property Name="fraudDetected" Type="Edm.Boolean"/>
        <Property Name="fraudType" Type="Edm.String"/>
        <Property Name="fraudReason" Type="Edm.String"/>
        <Property Name="verificationMessage" Type="Edm.String"/>
        <Property Name="verifiedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="verifiedBy" Type="Edm.String"/>
        <Property Name="syncBatchId" Type="Edm.String"/>
        <Property Name="lastSyncedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="syncStatus" Type="Edm.String"/>
        <Property Name="isActive" Type="Edm.Boolean"/>
      </ComplexType>
      <ComplexType Name="ReceiptDownload">
        <Property Name="expenseId" Type="Edm.String"/>
        <Property Name="receiptImageId" Type="Edm.String"/>
        <Property Name="receiptImageUrl" Type="Edm.String"/>
      </ComplexType>
      <ComplexType Name="ReceiptVerificationResult">
        <Property Name="success" Type="Edm.Boolean"/>
        <Property Name="expenseId" Type="Edm.String"/>
        <Property Name="receiptImageId" Type="Edm.String"/>
        <Property Name="model" Type="Edm.String"/>
        <Property Name="analysis" Type="Edm.String"/>
      </ComplexType>
      <Function Name="getPendingExpenseReceipts" IsBound="false" IsComposable="false">
        <Parameter Name="top" Type="Edm.Int32"/>
        <Parameter Name="skip" Type="Edm.Int32"/>
        <ReturnType Type="ReceiptFraudService.PendingExpenseReceiptCollection"/>
      </Function>
      <Function Name="downloadExpenseReceipt" IsBound="false" IsComposable="false">
        <Parameter Name="expenseId" Type="Edm.String"/>
        <ReturnType Type="ReceiptFraudService.ReceiptDownload"/>
      </Function>
      <Action Name="verifyReceipt" IsBound="false">
        <Parameter Name="expenseId" Type="Edm.String"/>
        <ReturnType Type="ReceiptFraudService.ReceiptVerificationResult"/>
      </Action>
      <Annotations Target="ReceiptFraudService.getPendingExpenseReceipts(Edm.Int32,Edm.Int32)/top">
        <Annotation Term="Core.OptionalParameter">
          <Record Type="Core.OptionalParameterType"/>
        </Annotation>
      </Annotations>
      <Annotations Target="ReceiptFraudService.getPendingExpenseReceipts(Edm.Int32,Edm.Int32)/skip">
        <Annotation Term="Core.OptionalParameter">
          <Record Type="Core.OptionalParameterType"/>
        </Annotation>
      </Annotations>
      <Annotations Target="ReceiptFraudService.downloadExpenseReceipt(Edm.String)/expenseId">
        <Annotation Term="Core.OptionalParameter">
          <Record Type="Core.OptionalParameterType"/>
        </Annotation>
      </Annotations>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>