<?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:Reference Uri="https://sap.github.io/odata-vocabularies/vocabularies/UI.xml">
    <edmx:Include Alias="UI" Namespace="com.sap.vocabularies.UI.v1"/>
  </edmx:Reference>
  <edmx:DataServices>
    <Schema Namespace="BudgetService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
      <EntityContainer Name="EntityContainer">
        <EntitySet Name="FinancialYears" EntityType="BudgetService.FinancialYears">
          <NavigationPropertyBinding Path="periods" Target="FinancialPeriods"/>
        </EntitySet>
        <EntitySet Name="FinancialPeriods" EntityType="BudgetService.FinancialPeriods">
          <NavigationPropertyBinding Path="year" Target="FinancialYears"/>
        </EntitySet>
        <EntitySet Name="ExpenseType" EntityType="BudgetService.ExpenseType"/>
        <EntitySet Name="SpendingCategories" EntityType="BudgetService.SpendingCategories">
          <NavigationPropertyBinding Path="expenseTypes" Target="CategoryExpenseTypes"/>
        </EntitySet>
        <EntitySet Name="BudgetAllocations" EntityType="BudgetService.BudgetAllocations">
          <NavigationPropertyBinding Path="year" Target="FinancialYears"/>
          <NavigationPropertyBinding Path="period" Target="FinancialPeriods"/>
          <NavigationPropertyBinding Path="categories" Target="AllocationCategories"/>
        </EntitySet>
        <EntitySet Name="BudgetRules" EntityType="BudgetService.BudgetRules">
          <NavigationPropertyBinding Path="year" Target="FinancialYears"/>
          <NavigationPropertyBinding Path="period" Target="FinancialPeriods"/>
          <NavigationPropertyBinding Path="categories" Target="RuleCategories"/>
        </EntitySet>
        <EntitySet Name="BudgetSettings" EntityType="BudgetService.BudgetSettings"/>
        <EntitySet Name="CategoryExpenseTypes" EntityType="BudgetService.CategoryExpenseTypes">
          <NavigationPropertyBinding Path="category" Target="SpendingCategories"/>
          <NavigationPropertyBinding Path="expenseType" Target="ExpenseType"/>
        </EntitySet>
        <EntitySet Name="AllocationCategories" EntityType="BudgetService.AllocationCategories">
          <NavigationPropertyBinding Path="allocation" Target="BudgetAllocations"/>
          <NavigationPropertyBinding Path="category" Target="SpendingCategories"/>
        </EntitySet>
        <EntitySet Name="RuleCategories" EntityType="BudgetService.RuleCategories">
          <NavigationPropertyBinding Path="rule" Target="BudgetRules"/>
          <NavigationPropertyBinding Path="category" Target="SpendingCategories"/>
        </EntitySet>
        <ActionImport Name="copyPreviousYearAllocations" Action="BudgetService.copyPreviousYearAllocations"/>
        <ActionImport Name="copyAllocationsToRules" Action="BudgetService.copyAllocationsToRules"/>
      </EntityContainer>
      <EntityType Name="FinancialYears">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="createdAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="createdBy" Type="Edm.String" MaxLength="255"/>
        <Property Name="modifiedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="modifiedBy" Type="Edm.String" MaxLength="255"/>
        <Property Name="name" Type="Edm.String" MaxLength="50"/>
        <Property Name="yearType" Type="Edm.String" MaxLength="20"/>
        <Property Name="periodType" Type="Edm.String" MaxLength="20"/>
        <Property Name="startDate" Type="Edm.Date"/>
        <Property Name="endDate" Type="Edm.Date"/>
        <NavigationProperty Name="periods" Type="Collection(BudgetService.FinancialPeriods)" Partner="year">
          <OnDelete Action="Cascade"/>
        </NavigationProperty>
      </EntityType>
      <EntityType Name="FinancialPeriods">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <NavigationProperty Name="year" Type="BudgetService.FinancialYears" Partner="periods">
          <ReferentialConstraint Property="year_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="year_ID" Type="Edm.Guid"/>
        <Property Name="periodId" Type="Edm.String" MaxLength="40"/>
        <Property Name="startDate" Type="Edm.Date"/>
        <Property Name="endDate" Type="Edm.Date"/>
      </EntityType>
      <EntityType Name="ExpenseType">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="expenseId" Type="Edm.String" MaxLength="50"/>
        <Property Name="expenseName" Type="Edm.String" MaxLength="255" Nullable="false"/>
        <Property Name="parentCategory" Type="Edm.String" MaxLength="100"/>
        <Property Name="isParentExpense" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="policies" Type="Edm.String"/>
        <Property Name="formId" Type="Edm.Guid"/>
        <Property Name="ledgerId" Type="Edm.Guid"/>
        <Property Name="accountCode" Type="Edm.Int32"/>
        <Property Name="active" Type="Edm.Boolean" DefaultValue="true"/>
        <Property Name="isSystemDefault" Type="Edm.Boolean" DefaultValue="false"/>
        <Property Name="createdAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="updatedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="createdBy_ID" Type="Edm.Guid"/>
        <Property Name="updatedBy_ID" Type="Edm.Guid"/>
        <Property Name="form_ID" Type="Edm.Guid"/>
        <Property Name="ledger_ID" Type="Edm.Guid"/>
      </EntityType>
      <EntityType Name="SpendingCategories">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="createdAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="createdBy" Type="Edm.String" MaxLength="255"/>
        <Property Name="modifiedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="modifiedBy" Type="Edm.String" MaxLength="255"/>
        <Property Name="name" Type="Edm.String" MaxLength="120"/>
        <Property Name="active" Type="Edm.Boolean" DefaultValue="true"/>
        <NavigationProperty Name="expenseTypes" Type="Collection(BudgetService.CategoryExpenseTypes)" Partner="category">
          <OnDelete Action="Cascade"/>
        </NavigationProperty>
      </EntityType>
      <EntityType Name="BudgetAllocations">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="createdAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="createdBy" Type="Edm.String" MaxLength="255"/>
        <Property Name="modifiedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="modifiedBy" Type="Edm.String" MaxLength="255"/>
        <NavigationProperty Name="year" Type="BudgetService.FinancialYears">
          <ReferentialConstraint Property="year_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="year_ID" Type="Edm.Guid"/>
        <NavigationProperty Name="period" Type="BudgetService.FinancialPeriods">
          <ReferentialConstraint Property="period_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="period_ID" Type="Edm.Guid"/>
        <Property Name="group_ID" Type="Edm.Guid"/>
        <Property Name="field_ID" Type="Edm.Guid"/>
        <Property Name="mappingCriteria" Type="Edm.String" MaxLength="20"/>
        <Property Name="mappingValues" Type="Edm.String"/>
        <Property Name="allocatedAmount" Type="Edm.Decimal" Precision="15" Scale="2"/>
        <Property Name="usedAmount" Type="Edm.Decimal" Precision="15" Scale="2" DefaultValue="0"/>
        <Property Name="remainingAmount" Type="Edm.Decimal" Precision="15" Scale="2"/>
        <NavigationProperty Name="categories" Type="Collection(BudgetService.AllocationCategories)" Partner="allocation">
          <OnDelete Action="Cascade"/>
        </NavigationProperty>
      </EntityType>
      <EntityType Name="BudgetRules">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="createdAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="createdBy" Type="Edm.String" MaxLength="255"/>
        <Property Name="modifiedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="modifiedBy" Type="Edm.String" MaxLength="255"/>
        <NavigationProperty Name="year" Type="BudgetService.FinancialYears">
          <ReferentialConstraint Property="year_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="year_ID" Type="Edm.Guid"/>
        <NavigationProperty Name="period" Type="BudgetService.FinancialPeriods">
          <ReferentialConstraint Property="period_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="period_ID" Type="Edm.Guid"/>
        <Property Name="allocatedAmount" Type="Edm.Decimal" Precision="15" Scale="2"/>
        <Property Name="budgetAllocationAmount" Type="Edm.Decimal" Precision="15" Scale="2"/>
        <Property Name="currency" Type="Edm.String" MaxLength="5"/>
        <Property Name="mappingCriteria" Type="Edm.String" MaxLength="20"/>
        <Property Name="mappingValues" Type="Edm.String"/>
        <NavigationProperty Name="categories" Type="Collection(BudgetService.RuleCategories)" Partner="rule">
          <OnDelete Action="Cascade"/>
        </NavigationProperty>
      </EntityType>
      <EntityType Name="BudgetSettings">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="createdAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="createdBy" Type="Edm.String" MaxLength="255"/>
        <Property Name="modifiedAt" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="modifiedBy" Type="Edm.String" MaxLength="255"/>
        <Property Name="enableApproval" Type="Edm.Boolean"/>
        <Property Name="enableValidation" Type="Edm.Boolean"/>
        <Property Name="notifyAt80" Type="Edm.Boolean"/>
        <Property Name="budgetApprover" Type="Edm.String" MaxLength="120"/>
        <Property Name="emailNotification" Type="Edm.Boolean"/>
      </EntityType>
      <EntityType Name="CategoryExpenseTypes">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <NavigationProperty Name="category" Type="BudgetService.SpendingCategories" Partner="expenseTypes">
          <ReferentialConstraint Property="category_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="category_ID" Type="Edm.Guid"/>
        <NavigationProperty Name="expenseType" Type="BudgetService.ExpenseType">
          <ReferentialConstraint Property="expenseType_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="expenseType_ID" Type="Edm.Guid"/>
      </EntityType>
      <EntityType Name="AllocationCategories">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <NavigationProperty Name="allocation" Type="BudgetService.BudgetAllocations" Partner="categories">
          <ReferentialConstraint Property="allocation_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="allocation_ID" Type="Edm.Guid"/>
        <NavigationProperty Name="category" Type="BudgetService.SpendingCategories">
          <ReferentialConstraint Property="category_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="category_ID" Type="Edm.Guid"/>
      </EntityType>
      <EntityType Name="RuleCategories">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <NavigationProperty Name="rule" Type="BudgetService.BudgetRules" Partner="categories">
          <ReferentialConstraint Property="rule_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="rule_ID" Type="Edm.Guid"/>
        <NavigationProperty Name="category" Type="BudgetService.SpendingCategories">
          <ReferentialConstraint Property="category_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="category_ID" Type="Edm.Guid"/>
      </EntityType>
      <Action Name="copyPreviousYearAllocations" IsBound="false">
        <Parameter Name="year" Type="Edm.Guid"/>
        <ReturnType Type="Edm.String"/>
      </Action>
      <Action Name="copyAllocationsToRules" IsBound="false">
        <Parameter Name="year" Type="Edm.Guid"/>
        <ReturnType Type="Edm.String"/>
      </Action>
      <Annotations Target="BudgetService.FinancialYears/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.FinancialYears/createdAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Created On"/>
      </Annotations>
      <Annotations Target="BudgetService.FinancialYears/createdBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Created By"/>
      </Annotations>
      <Annotations Target="BudgetService.FinancialYears/modifiedAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Changed On"/>
      </Annotations>
      <Annotations Target="BudgetService.FinancialYears/modifiedBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Changed By"/>
      </Annotations>
      <Annotations Target="BudgetService.FinancialPeriods/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.ExpenseType/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.ExpenseType/createdAt">
        <Annotation Term="Core.Computed" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.ExpenseType/updatedAt">
        <Annotation Term="Core.Computed" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.SpendingCategories/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.SpendingCategories/createdAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Created On"/>
      </Annotations>
      <Annotations Target="BudgetService.SpendingCategories/createdBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Created By"/>
      </Annotations>
      <Annotations Target="BudgetService.SpendingCategories/modifiedAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Changed On"/>
      </Annotations>
      <Annotations Target="BudgetService.SpendingCategories/modifiedBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Changed By"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetAllocations/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetAllocations/createdAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Created On"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetAllocations/createdBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Created By"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetAllocations/modifiedAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Changed On"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetAllocations/modifiedBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Changed By"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetRules/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetRules/createdAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Created On"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetRules/createdBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Created By"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetRules/modifiedAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Changed On"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetRules/modifiedBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Changed By"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetSettings/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetSettings/createdAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Created On"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetSettings/createdBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Immutable" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Created By"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetSettings/modifiedAt">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Common.Label" String="Changed On"/>
      </Annotations>
      <Annotations Target="BudgetService.BudgetSettings/modifiedBy">
        <Annotation Term="UI.HiddenFilter" Bool="true"/>
        <Annotation Term="Core.Computed" Bool="true"/>
        <Annotation Term="Core.Description" String="User's unique ID"/>
        <Annotation Term="Common.Label" String="Changed By"/>
      </Annotations>
      <Annotations Target="BudgetService.CategoryExpenseTypes/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.AllocationCategories/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="BudgetService.RuleCategories/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>