<?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="Masters" xmlns="http://docs.oasis-open.org/odata/ns/edm">
      <EntityContainer Name="EntityContainer">
        <EntitySet Name="Users" EntityType="Masters.Users">
          <NavigationPropertyBinding Path="currencyId" Target="Currencies"/>
          <NavigationPropertyBinding Path="dependents" Target="UserDependents"/>
        </EntitySet>
        <EntitySet Name="Currencies" EntityType="Masters.Currencies"/>
        <EntitySet Name="ExchangeRates" EntityType="Masters.ExchangeRates">
          <NavigationPropertyBinding Path="fromCurrency" Target="Currencies"/>
          <NavigationPropertyBinding Path="toCurrency" Target="Currencies"/>
        </EntitySet>
        <EntitySet Name="UserDependents" EntityType="Masters.UserDependents">
          <NavigationPropertyBinding Path="user" Target="Users"/>
        </EntitySet>
        <ActionImport Name="uploadMaster" Action="Masters.uploadMaster"/>
        <ActionImport Name="getExchangeRates" Action="Masters.getExchangeRates"/>
      </EntityContainer>
      <EntityType Name="Users">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="username" Type="Edm.String" MaxLength="100" Nullable="false"/>
        <Property Name="password" Type="Edm.String" MaxLength="100" Nullable="false"/>
        <Property Name="firstName" Type="Edm.String" MaxLength="32"/>
        <Property Name="middleName" Type="Edm.String" MaxLength="32"/>
        <Property Name="lastName" Type="Edm.String" MaxLength="32"/>
        <Property Name="employeeId" Type="Edm.String" MaxLength="48"/>
        <Property Name="position" Type="Edm.String" MaxLength="100"/>
        <Property Name="managerId" Type="Edm.String" MaxLength="100"/>
        <Property Name="managerName" Type="Edm.String" MaxLength="100"/>
        <Property Name="email" Type="Edm.String" MaxLength="255"/>
        <Property Name="passportNumber" Type="Edm.String" MaxLength="100"/>
        <Property Name="passportExpiryDate" Type="Edm.Date"/>
        <Property Name="aadharNumber" Type="Edm.String" MaxLength="100"/>
        <Property Name="created_at" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="updated_at" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="is_active" Type="Edm.Boolean" DefaultValue="true"/>
        <Property Name="isTestUser" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="expenseUser" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="expenseApprover" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="requestUser" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="requestApprover" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="autoApproval" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="oneLevelApproval" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="mustChangePassword" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="passwordResetToken" Type="Edm.String" MaxLength="255"/>
        <Property Name="passwordResetExpiry" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="cashAdvanceAccountCode" Type="Edm.String" MaxLength="20"/>
        <Property Name="vendorId" Type="Edm.String" MaxLength="20"/>
        <Property Name="sbuId_ID" Type="Edm.Guid"/>
        <Property Name="costCenterId_ID" Type="Edm.Guid"/>
        <Property Name="departmentId_ID" Type="Edm.Guid"/>
        <Property Name="divisionId_ID" Type="Edm.Guid"/>
        <Property Name="designationId_ID" Type="Edm.Guid"/>
        <Property Name="gradeId_ID" Type="Edm.Guid"/>
        <Property Name="companyId_ID" Type="Edm.Guid"/>
        <Property Name="orgLevel1_ID" Type="Edm.Guid"/>
        <Property Name="orgLevel2_ID" Type="Edm.Guid"/>
        <Property Name="orgLevel3_ID" Type="Edm.Guid"/>
        <Property Name="orgLevel4_ID" Type="Edm.Guid"/>
        <Property Name="orgLevel5_ID" Type="Edm.Guid"/>
        <Property Name="orgLevel6_ID" Type="Edm.Guid"/>
        <Property Name="ledgerId_ID" Type="Edm.Guid"/>
        <Property Name="group_ID" Type="Edm.Guid"/>
        <NavigationProperty Name="currencyId" Type="Masters.Currencies">
          <ReferentialConstraint Property="currencyId_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="currencyId_ID" Type="Edm.Guid"/>
        <Property Name="countryId_ID" Type="Edm.Int32"/>
        <Property Name="endDate" Type="Edm.Date"/>
        <NavigationProperty Name="dependents" Type="Collection(Masters.UserDependents)" Partner="user">
          <OnDelete Action="Cascade"/>
        </NavigationProperty>
      </EntityType>
      <EntityType Name="Currencies">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="currency_code" Type="Edm.String" MaxLength="100"/>
        <Property Name="currency_name" Type="Edm.String" MaxLength="255"/>
      </EntityType>
      <EntityType Name="ExchangeRates">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <NavigationProperty Name="fromCurrency" Type="Masters.Currencies">
          <ReferentialConstraint Property="fromCurrency_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="fromCurrency_ID" Type="Edm.Guid"/>
        <NavigationProperty Name="toCurrency" Type="Masters.Currencies">
          <ReferentialConstraint Property="toCurrency_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="toCurrency_ID" Type="Edm.Guid"/>
        <Property Name="startDate" Type="Edm.Date"/>
        <Property Name="exchangeRate" Type="Edm.Decimal" Precision="15" Scale="6"/>
        <Property Name="endDate" Type="Edm.Date"/>
        <Property Name="isActive" Type="Edm.Boolean" DefaultValue="true"/>
        <Property Name="createdAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="modifiedAt" Type="Edm.DateTimeOffset" Precision="7"/>
      </EntityType>
      <EntityType Name="UserDependents">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <NavigationProperty Name="user" Type="Masters.Users" Partner="dependents">
          <ReferentialConstraint Property="user_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="user_ID" Type="Edm.Guid"/>
        <Property Name="name" Type="Edm.String" MaxLength="255"/>
        <Property Name="relation" Type="Edm.String" MaxLength="50"/>
        <Property Name="passportNumber" Type="Edm.String" MaxLength="100"/>
        <Property Name="passportExpiryDate" Type="Edm.Date"/>
        <Property Name="aadharNumber" Type="Edm.String" MaxLength="100"/>
      </EntityType>
      <ComplexType Name="return_Masters_uploadMaster">
        <Property Name="success" Type="Edm.Boolean"/>
        <Property Name="inserted" Type="Edm.Int32"/>
        <Property Name="updated" Type="Edm.Int32"/>
        <Property Name="total" Type="Edm.Int32"/>
        <Property Name="errors" Type="Collection(Edm.String)" Nullable="false"/>
      </ComplexType>
      <ComplexType Name="return_Masters_getExchangeRates">
        <Property Name="fromCurrencyCode" Type="Edm.String"/>
        <Property Name="toCurrencyCode" Type="Edm.String"/>
        <Property Name="startDate" Type="Edm.String"/>
        <Property Name="endDate" Type="Edm.String"/>
        <Property Name="exchangeRate" Type="Edm.Decimal" Precision="15" Scale="6"/>
      </ComplexType>
      <Action Name="uploadMaster" IsBound="false">
        <Parameter Name="file" Type="Edm.String"/>
        <Parameter Name="uploadType" Type="Edm.String"/>
        <ReturnType Type="Masters.return_Masters_uploadMaster"/>
      </Action>
      <Action Name="getExchangeRates" IsBound="false">
        <Parameter Name="from" Type="Edm.String"/>
        <Parameter Name="to" Type="Edm.String"/>
        <Parameter Name="startDate" Type="Edm.String"/>
        <Parameter Name="endDate" Type="Edm.String"/>
        <ReturnType Type="Collection(Masters.return_Masters_getExchangeRates)" Nullable="false"/>
      </Action>
      <Annotations Target="Masters.Users/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="Masters.Currencies/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="Masters.ExchangeRates/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="Masters.ExchangeRates/createdAt">
        <Annotation Term="Core.Computed" Bool="true"/>
      </Annotations>
      <Annotations Target="Masters.ExchangeRates/modifiedAt">
        <Annotation Term="Core.Computed" Bool="true"/>
      </Annotations>
      <Annotations Target="Masters.UserDependents/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>