<?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="AuditTrailService" xmlns="http://docs.oasis-open.org/odata/ns/edm">
      <EntityContainer Name="EntityContainer">
        <EntitySet Name="AuditTrail" EntityType="AuditTrailService.AuditTrail"/>
        <EntitySet Name="Users" EntityType="AuditTrailService.Users"/>
        <FunctionImport Name="auditTrails" Function="AuditTrailService.auditTrails"/>
      </EntityContainer>
      <EntityType Name="AuditTrail">
        <Key>
          <PropertyRef Name="ID"/>
        </Key>
        <Property Name="ID" Type="Edm.Guid" Nullable="false"/>
        <Property Name="entity_name" Type="Edm.String" MaxLength="100"/>
        <Property Name="entity_id" Type="Edm.String" MaxLength="36"/>
        <Property Name="action" Type="Edm.String" MaxLength="50"/>
        <Property Name="description" Type="Edm.String" MaxLength="500"/>
        <Property Name="user_id" Type="Edm.String" MaxLength="36"/>
        <Property Name="username" Type="Edm.String" MaxLength="100"/>
        <Property Name="target_user_id" Type="Edm.String" MaxLength="36"/>
        <Property Name="target_username" Type="Edm.String" MaxLength="100"/>
        <Property Name="timestamp" Type="Edm.DateTimeOffset" Precision="7"/>
      </EntityType>
      <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="firstName" Type="Edm.String" MaxLength="32"/>
        <Property Name="lastName" Type="Edm.String" MaxLength="32"/>
        <Property Name="email" Type="Edm.String" MaxLength="255"/>
      </EntityType>
      <ComplexType Name="return_AuditTrailService_auditTrails">
        <Property Name="ID" Type="Edm.Guid"/>
        <Property Name="entity_name" Type="Edm.String"/>
        <Property Name="entity_id" Type="Edm.String"/>
        <Property Name="action" Type="Edm.String"/>
        <Property Name="description" Type="Edm.String"/>
        <Property Name="user_id" Type="Edm.String"/>
        <Property Name="username" Type="Edm.String"/>
        <Property Name="userEmail" Type="Edm.String"/>
        <Property Name="userFirstName" Type="Edm.String"/>
        <Property Name="userLastName" Type="Edm.String"/>
        <Property Name="timestamp" Type="Edm.DateTimeOffset" Precision="7"/>
      </ComplexType>
      <Function Name="auditTrails" IsBound="false" IsComposable="false">
        <Parameter Name="limit" Type="Edm.Int32"/>
        <Parameter Name="offset" Type="Edm.Int32"/>
        <ReturnType Type="Collection(AuditTrailService.return_AuditTrailService_auditTrails)" Nullable="false"/>
      </Function>
      <Annotations Target="AuditTrailService.AuditTrail/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
      <Annotations Target="AuditTrailService.Users/ID">
        <Annotation Term="Core.ComputedDefaultValue" Bool="true"/>
      </Annotations>
    </Schema>
  </edmx:DataServices>
</edmx:Edmx>