<?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="AuditRuleService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
      <EntityContainer Name="EntityContainer">
        <EntitySet Name="AuditRules" EntityType="AuditRuleService.AuditRules"/>
        <EntitySet Name="AuditConditions" EntityType="AuditRuleService.AuditConditions">
          <NavigationPropertyBinding Path="audit_rule" Target="AuditRules"/>
        </EntitySet>
      </EntityContainer>
      <EntityType Name="AuditRules">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="name" Type="Edm.String" MaxLength="100"/>
        <Property Name="rule_type" Type="Edm.String" MaxLength="50"/>
        <Property Name="applies_to_all_policies" Type="Edm.Boolean"/>
        <Property Name="policies_ID" Type="Edm.Guid"/>
        <Property Name="created_at" Type="Edm.DateTimeOffset" Precision="7"/>
        <Property Name="updated_at" Type="Edm.DateTimeOffset" Precision="7"/>
      </EntityType>
      <EntityType Name="AuditConditions">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <NavigationProperty Name="audit_rule" Type="AuditRuleService.AuditRules">
          <ReferentialConstraint Property="audit_rule_ID" ReferencedProperty="ID"/>
        </NavigationProperty>
        <Property Name="audit_rule_ID" Type="Edm.Guid"/>
        <Property Name="condition_key" Type="Edm.String" MaxLength="50"/>
        <Property Name="operator" Type="Edm.String" MaxLength="10"/>
        <Property Name="threshold_value" Type="Edm.String" MaxLength="50"/>
        <Property Name="logical_operator" Type="Edm.String" MaxLength="10"/>
      </EntityType>
      <Annotations Target="AuditRuleService.AuditRules/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="AuditRuleService.AuditConditions/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>