﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date, ,>
-- Description:	<Description, ,>
-- =============================================
CREATE FUNCTION [dbo].[mfr__schema]
(
	
)
RETURNS XML
AS
BEGIN
	DECLARe @AS XML;
SET @AS = N'
    <Schema>
      <EntityType Name="ItemType">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="CustomValues" Type="Collection(MFR.Domain.Api.Documents.CustomValue)" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Costs" Type="Edm.Decimal" Nullable="false" />
        <Property Name="Description" Type="Edm.String" />
        <Property Name="ListPrice" Type="Edm.Decimal" Nullable="false" />
        <Property Name="Manufacture" Type="Edm.String" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="ItemNumber" Type="Edm.String" />
        <Property Name="NameOrNumber" Type="Edm.String" />
        <Property Name="GlobalTradeItemNr" Type="Edm.String" />
        <Property Name="Type" Type="Edm.String" />
        <Property Name="Price" Type="Edm.Decimal" Nullable="false" />
        <Property Name="VAT" Type="Edm.Decimal" Nullable="false" />
        <Property Name="IsPortalOnly" Type="Edm.Boolean" Nullable="false" />
        <Property Name="Discount" Type="Edm.Decimal" Nullable="false" />
        <Property Name="DateModified" Type="Edm.DateTime" Nullable="false" />
        <Property Name="IsDiscontinued" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsWarehouse" Type="Edm.Boolean" Nullable="false" />
        <Property Name="UnitId" Type="Edm.Int64" />
        <Property Name="UnitString" Type="Edm.String" />
        <NavigationProperty Name="Unit" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ItemType_Unit_MFR_Domain_Api_Documents_ItemUnit_UnitPartner" ToRole="Unit" FromRole="UnitPartner" />
      </EntityType>
      <ComplexType Name="CustomValue">
        <Property Name="Meta" Type="Edm.String" />
        <Property Name="Value" Type="Edm.String" />
      </ComplexType>
      <EntityType Name="ServiceRequest">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="InvoiceId" Type="Edm.String" />
        <Property Name="ClosedAt" Type="Edm.DateTime" />
        <Property Name="ReleasedAt" Type="Edm.DateTime" />
        <Property Name="WorkDoneAt" Type="Edm.DateTime" />
        <Property Name="TargetTimeInMinutes" Type="Edm.Int64" Nullable="false" />
        <Property Name="DateModified" Type="Edm.DateTime" />
        <Property Name="DateOfCreation" Type="Edm.DateTime" />
        <Property Name="DueDateRangeStart" Type="Edm.DateTime" />
        <Property Name="DueDateRangeEnd" Type="Edm.DateTime" />
        <Property Name="PortalLink" Type="Edm.String" />
        <Property Name="CostCenterId" Type="Edm.Int64" />
        <Property Name="Description" Type="Edm.String" />
        <Property Name="State" Type="Edm.String" />
        <Property Name="CustomValues" Type="Collection(MFR.Domain.Api.Documents.CustomValue)" Nullable="false" />
        <Property Name="CurrentOwnerId" Type="Edm.Int64" />
        <Property Name="CustomerId" Type="Edm.Int64" />
        <Property Name="ParentServiceRequestId" Type="Edm.Int64" />
        <Property Name="Location" Type="MFR.Domain.Api.Documents.Location" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="IsTemplate" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsTemplateMobile" Type="Edm.Boolean" Nullable="false" />
        <Property Name="CreateFromServiceRequestTemplateId" Type="Edm.Int64" Nullable="false" />
        <Property Name="Type" Type="Edm.String" />
        <NavigationProperty Name="CreatedBy" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_CreatedBy_MFR_Domain_Api_Documents_Contact_CreatedByPartner" ToRole="CreatedBy" FromRole="CreatedByPartner" />
        <NavigationProperty Name="ClosedBy" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_ClosedBy_MFR_Domain_Api_Documents_User_ClosedByPartner" ToRole="ClosedBy" FromRole="ClosedByPartner" />
        <NavigationProperty Name="ReleasedBy" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_ReleasedBy_MFR_Domain_Api_Documents_User_ReleasedByPartner" ToRole="ReleasedBy" FromRole="ReleasedByPartner" />
        <NavigationProperty Name="CostCenter" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_CostCenter_MFR_Domain_Api_Documents_CostCenter_CostCenterPartner" ToRole="CostCenter" FromRole="CostCenterPartner" />
        <NavigationProperty Name="Appointments" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Appointments_MFR_Domain_Api_Documents_Appointment_AppointmentsPartner" ToRole="Appointments" FromRole="AppointmentsPartner" />
        <NavigationProperty Name="Items" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Items_MFR_Domain_Api_Documents_Item_ItemsPartner" ToRole="Items" FromRole="ItemsPartner" />
        <NavigationProperty Name="Documents" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Documents_MFR_Domain_Api_Documents_Document_DocumentsPartner" ToRole="Documents" FromRole="DocumentsPartner" />
        <NavigationProperty Name="Reports" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Reports_MFR_Domain_Api_Documents_Report_ReportsPartner" ToRole="Reports" FromRole="ReportsPartner" />
        <NavigationProperty Name="Contacts" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner" ToRole="Contacts" FromRole="ContactsPartner" />
        <NavigationProperty Name="StepListTemplates" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_StepListTemplates_MFR_Domain_Api_Documents_StepListTemplate_StepListTemplatesPartner" ToRole="StepListTemplates" FromRole="StepListTemplatesPartner" />
        <NavigationProperty Name="ServiceObjects" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_ServiceObjects_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectsPartner" ToRole="ServiceObjects" FromRole="ServiceObjectsPartner" />
        <NavigationProperty Name="TimeEvents" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_TimeEvents_MFR_Domain_Api_Documents_TimeEvent_TimeEventsPartner" ToRole="TimeEvents" FromRole="TimeEventsPartner" />
        <NavigationProperty Name="Comments" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Comments_MFR_Domain_Api_Documents_Comment_CommentsPartner" ToRole="Comments" FromRole="CommentsPartner" />
        <NavigationProperty Name="CurrentOwner" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_CurrentOwner_MFR_Domain_Api_Documents_Contact_CurrentOwnerPartner" ToRole="CurrentOwner" FromRole="CurrentOwnerPartner" />
        <NavigationProperty Name="Customer" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Customer_MFR_Domain_Api_Documents_Company_CustomerPartner" ToRole="Customer" FromRole="CustomerPartner" />
        <NavigationProperty Name="Tags" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Tags_MFR_Domain_Api_Documents_Tag_TagsPartner" ToRole="Tags" FromRole="TagsPartner" />
        <NavigationProperty Name="Steps" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Steps_MFR_Domain_Api_Documents_Step_StepsPartner" ToRole="Steps" FromRole="StepsPartner" />
        <NavigationProperty Name="StockMovements" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_StockMovements_MFR_Domain_Api_Documents_StockMovement_StockMovementsPartner" ToRole="StockMovements" FromRole="StockMovementsPartner" />
        <NavigationProperty Name="Qualifications" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Qualifications_MFR_Domain_Api_Documents_Qualification_QualificationsPartner" ToRole="Qualifications" FromRole="QualificationsPartner" />
        <NavigationProperty Name="Invoices" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Invoices_MFR_Domain_Api_Documents_Invoice_InvoicesPartner" ToRole="Invoices" FromRole="InvoicesPartner" />
      </EntityType>
      <EntityType Name="Item">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="QuantityHours" Type="Edm.Decimal" Nullable="false" />
        <Property Name="PlannedQuantityHours" Type="Edm.Decimal" Nullable="false" />
        <Property Name="ItemTypeId" Type="Edm.Int64" />
        <Property Name="ItemNumber" Type="Edm.String" />
        <Property Name="TrackingId" Type="Edm.String" />
        <Property Name="Manufacture" Type="Edm.String" />
        <Property Name="Price" Type="Edm.Decimal" Nullable="false" />
        <Property Name="Costs" Type="Edm.Decimal" />
        <Property Name="NameOrNumber" Type="Edm.String" />
        <Property Name="CustomValues" Type="Collection(MFR.Domain.Api.Documents.CustomValue)" Nullable="false" />
        <Property Name="Note" Type="Edm.String" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="Discount" Type="Edm.Decimal" Nullable="false" />
        <Property Name="VAT" Type="Edm.Decimal" Nullable="false" />
        <Property Name="IsManual" Type="Edm.Boolean" Nullable="false" />
        <Property Name="SortOrder" Type="Edm.Int32" Nullable="false" />
        <Property Name="Type" Type="Edm.String" />
        <Property Name="ServiceRequestId" Type="Edm.Int64" Nullable="false" />
        <Property Name="ServiceObjectId" Type="Edm.Int64" Nullable="false" />
        <Property Name="CreatorId" Type="Edm.Int64" Nullable="false" />
        <Property Name="UnitId" Type="Edm.Int64" />
        <Property Name="UnitString" Type="Edm.String" />
        <NavigationProperty Name="ItemType" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_ItemType_MFR_Domain_Api_Documents_ItemType_ItemTypePartner" ToRole="ItemType" FromRole="ItemTypePartner" />
        <NavigationProperty Name="ServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner" ToRole="ServiceRequest" FromRole="ServiceRequestPartner" />
        <NavigationProperty Name="ServiceObject" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner" ToRole="ServiceObject" FromRole="ServiceObjectPartner" />
        <NavigationProperty Name="Creator" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_Creator_MFR_Domain_Api_Documents_Contact_CreatorPartner" ToRole="Creator" FromRole="CreatorPartner" />
        <NavigationProperty Name="Unit" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_Unit_MFR_Domain_Api_Documents_ItemUnit_UnitPartner" ToRole="Unit" FromRole="UnitPartner" />
      </EntityType>
      <EntityType Name="StockMovement">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Amount" Type="Edm.Decimal" Nullable="false" />
        <Property Name="AmountReceived" Type="Edm.Decimal" Nullable="false" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="ItemId" Type="Edm.Int64" />
        <Property Name="ItemTypeId" Type="Edm.Int64" />
        <Property Name="StockMovementType" Type="Edm.String" />
        <Property Name="State" Type="Edm.String" />
        <Property Name="ServiceRequestId" Type="Edm.Int64" Nullable="false" />
        <Property Name="WarehouseId" Type="Edm.Int64" Nullable="false" />
        <Property Name="DateOfCreation" Type="Edm.DateTime" Nullable="false" />
        <Property Name="DateModified" Type="Edm.DateTime" Nullable="false" />
        <Property Name="TargetDate" Type="Edm.DateTime" Nullable="false" />
        <Property Name="CreatedById" Type="Edm.Int64" Nullable="false" />
        <Property Name="ConfirmedById" Type="Edm.Int64" Nullable="false" />
        <NavigationProperty Name="Item" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_Item_MFR_Domain_Api_Documents_Item_ItemPartner" ToRole="Item" FromRole="ItemPartner" />
        <NavigationProperty Name="ItemType" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_ItemType_MFR_Domain_Api_Documents_ItemType_ItemTypePartner" ToRole="ItemType" FromRole="ItemTypePartner" />
        <NavigationProperty Name="ServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner" ToRole="ServiceRequest" FromRole="ServiceRequestPartner" />
        <NavigationProperty Name="Warehouse" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_Warehouse_MFR_Domain_Api_Documents_ServiceObject_WarehousePartner" ToRole="Warehouse" FromRole="WarehousePartner" />
        <NavigationProperty Name="CreatedBy" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_CreatedBy_MFR_Domain_Api_Documents_Contact_CreatedByPartner" ToRole="CreatedBy" FromRole="CreatedByPartner" />
        <NavigationProperty Name="ConfirmedBy" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_ConfirmedBy_MFR_Domain_Api_Documents_Contact_ConfirmedByPartner" ToRole="ConfirmedBy" FromRole="ConfirmedByPartner" />
      </EntityType>
      <EntityType Name="CostCenter">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
      </EntityType>
      <EntityType Name="ItemUnit">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
      </EntityType>
      <EntityType Name="TimeEvent">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="State" Type="Edm.String" />
        <Property Name="IsApproved" Type="Edm.Boolean" Nullable="false" />
        <Property Name="TimeEventType" Type="Edm.String" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="DateModified" Type="Edm.DateTime" Nullable="false" />
        <Property Name="StartDateTime" Type="Edm.DateTime" Nullable="false" />
        <Property Name="EndDateTime" Type="Edm.DateTime" Nullable="false" />
        <Property Name="ProposedDrivingDistance" Type="Edm.Int32" Nullable="false" />
        <Property Name="ContactId" Type="Edm.Int64" Nullable="false" />
        <Property Name="ServiceRequestId" Type="Edm.Int64" Nullable="false" />
        <Property Name="Description" Type="Edm.String" />
        <NavigationProperty Name="Contact" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_TimeEvent_Contact_MFR_Domain_Api_Documents_Contact_ContactPartner" ToRole="Contact" FromRole="ContactPartner" />
        <NavigationProperty Name="ServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_TimeEvent_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner" ToRole="ServiceRequest" FromRole="ServiceRequestPartner" />
      </EntityType>
      <EntityType Name="Document">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="CustomValues" Type="Collection(MFR.Domain.Api.Documents.CustomValue)" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="State" Type="Edm.String" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="URI" Type="Edm.String" />
        <Property Name="IsGlobal" Type="Edm.Boolean" Nullable="false" />
        <Property Name="StartDateTime" Type="Edm.DateTime" Nullable="false" />
        <Property Name="EndDateTime" Type="Edm.DateTime" Nullable="false" />
        <Property Name="FileName" Type="Edm.String" />
        <Property Name="DateModified" Type="Edm.DateTime" Nullable="false" />
        <Property Name="UploadDate" Type="Edm.DateTime" Nullable="false" />
        <Property Name="IsLink" Type="Edm.Boolean" Nullable="false" />
        <Property Name="ContentType" Type="Edm.String" />
        <Property Name="HTMLCode" Type="Edm.String" />
        <Property Name="ServiceRequestId" Type="Edm.Int64" Nullable="false" />
        <Property Name="Note" Type="Edm.String" />
        <NavigationProperty Name="ServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Document_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner" ToRole="ServiceRequest" FromRole="ServiceRequestPartner" />
      </EntityType>
      <EntityType Name="Report">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="DateOfCreation" Type="Edm.DateTime" Nullable="false" />
        <Property Name="URI" Type="Edm.String" />
        <Property Name="DocumentName" Type="Edm.String" />
        <Property Name="FileTypeString" Type="Edm.String" />
        <Property Name="ReportDefinitionCode" Type="Edm.String" />
        <Property Name="ServiceObjectId" Type="Edm.Int64" Nullable="false" />
        <Property Name="CanBeDeleted" Type="Edm.Boolean" Nullable="false" />
        <Property Name="InvoiceBalance" Type="Edm.Decimal" Nullable="false" />
        <Property Name="InvoiceId" Type="Edm.String" />
        <Property Name="DueDate" Type="Edm.DateTime" Nullable="false" />
        <Property Name="IsPayed" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsInvoice" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsCanceled" Type="Edm.Boolean" Nullable="false" />
        <Property Name="CustomValues" Type="Collection(MFR.Domain.Api.Documents.CustomValue)" Nullable="false" />
        <NavigationProperty Name="ServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Report_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner" ToRole="ServiceRequest" FromRole="ServiceRequestPartner" />
        <NavigationProperty Name="ServiceObject" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Report_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner" ToRole="ServiceObject" FromRole="ServiceObjectPartner" />
      </EntityType>
      <EntityType Name="Invoice">
        <Property Name="Id" Type="Edm.Int64" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="DateOfCreation" Type="Edm.DateTime" Nullable="false" />
        <Property Name="URI" Type="Edm.String" />
        <Property Name="DocumentName" Type="Edm.String" />
        <Property Name="ReportDefinitionCode" Type="Edm.String" />
        <Property Name="FileType" Type="Edm.String" />
        <Property Name="InvoiceBalance" Type="Edm.Decimal" Nullable="false" />
        <Property Name="InvoiceBalanceNetto" Type="Edm.Decimal" Nullable="false" />
        <Property Name="WageBalanceNet" Type="Edm.Decimal" Nullable="false" />
        <Property Name="DatePayed" Type="Edm.DateTime" />
        <Property Name="InvoiceId" Type="Edm.String" />
        <Property Name="DueDate" Type="Edm.DateTime" Nullable="false" />
        <Property Name="WithoutVAT" Type="Edm.Boolean" Nullable="false" />
        <Property Name="Skonto" Type="Edm.Decimal" Nullable="false" />
        <Property Name="PartialPayment" Type="Edm.Decimal" Nullable="false" />
        <Property Name="InvoiceState" Type="Edm.String" />
        <Property Name="Note" Type="Edm.String" />
        <NavigationProperty Name="SourceServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_SourceServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_SourceServiceRequestPartner" ToRole="SourceServiceRequest" FromRole="SourceServiceRequestPartner" />
        <NavigationProperty Name="Author" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_Author_MFR_Domain_Api_Documents_Contact_AuthorPartner" ToRole="Author" FromRole="AuthorPartner" />
        <NavigationProperty Name="Customer" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_Customer_MFR_Domain_Api_Documents_Company_CustomerPartner" ToRole="Customer" FromRole="CustomerPartner" />
        <NavigationProperty Name="CostCenter" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_CostCenter_MFR_Domain_Api_Documents_CostCenter_CostCenterPartner" ToRole="CostCenter" FromRole="CostCenterPartner" />
        <NavigationProperty Name="ServiceObject" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner" ToRole="ServiceObject" FromRole="ServiceObjectPartner" />
        <NavigationProperty Name="Dunnings" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_Dunnings_MFR_Domain_Api_Documents_Report_DunningsPartner" ToRole="Dunnings" FromRole="DunningsPartner" />
      </EntityType>
      <EntityType Name="Comment">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="DateOfCreation" Type="Edm.DateTime" Nullable="false" />
        <Property Name="IsInternal" Type="Edm.Boolean" Nullable="false" />
        <Property Name="ServiceRequestId" Type="Edm.Int64" Nullable="false" />
        <Property Name="CompanyId" Type="Edm.Int64" Nullable="false" />
        <Property Name="Content" Type="Edm.String" />
        <NavigationProperty Name="Owner" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Comment_Owner_MFR_Domain_Api_Documents_Contact_OwnerPartner" ToRole="Owner" FromRole="OwnerPartner" />
        <NavigationProperty Name="ServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Comment_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner" ToRole="ServiceRequest" FromRole="ServiceRequestPartner" />
        <NavigationProperty Name="Company" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Comment_Company_MFR_Domain_Api_Documents_Company_CompanyPartner" ToRole="Company" FromRole="CompanyPartner" />
      </EntityType>
      <EntityType Name="Attachment">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="URI" Type="Edm.String" />
        <Property Name="StepId" Type="Edm.Int64" Nullable="false" />
        <NavigationProperty Name="Step" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Attachment_Step_MFR_Domain_Api_Documents_Step_StepPartner" ToRole="Step" FromRole="StepPartner" />
      </EntityType>
      <EntityType Name="Appointment">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="State" Type="Edm.String" />
        <Property Name="Type" Type="Edm.String" />
        <Property Name="CreatedAt" Type="Edm.DateTime" Nullable="false" />
        <Property Name="EndDateTime" Type="Edm.DateTime" />
        <Property Name="StartDateTime" Type="Edm.DateTime" Nullable="false" />
        <Property Name="DrivingDistanceFrom" Type="Edm.Int32" />
        <Property Name="DrivingDistanceTo" Type="Edm.Int32" />
        <Property Name="WasReadOnClientSide" Type="Edm.Boolean" Nullable="false" />
        <Property Name="ContactIds" Type="Collection(Edm.Int64)" Nullable="false" />
        <Property Name="ServiceRequestId" Type="Edm.Int64" Nullable="false" />
        <Property Name="ContactId" Type="Edm.Int64" Nullable="false" />
        <Property Name="Note" Type="Edm.String" />
        <NavigationProperty Name="ServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Appointment_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner" ToRole="ServiceRequest" FromRole="ServiceRequestPartner" />
        <NavigationProperty Name="Contacts" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Appointment_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner" ToRole="Contacts" FromRole="ContactsPartner" />
        <NavigationProperty Name="Contact" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Appointment_Contact_MFR_Domain_Api_Documents_Contact_ContactPartner" ToRole="Contact" FromRole="ContactPartner" />
      </EntityType>
      <EntityType Name="Step">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="MobileId" Type="Edm.Int64" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="IsDone" Type="Edm.Boolean" Nullable="false" />
        <Property Name="HasError" Type="Edm.Boolean" Nullable="false" />
        <Property Name="TrackingId" Type="Edm.String" />
        <Property Name="Type" Type="Edm.String" />
        <Property Name="SortOrder" Type="Edm.Int32" Nullable="false" />
        <Property Name="Data" Type="Edm.String" />
        <Property Name="DateModifiedOffline" Type="Edm.DateTime" />
        <Property Name="ServiceRequestId" Type="Edm.Int64" />
        <Property Name="Description" Type="Edm.String" />
        <Property Name="Comment" Type="Edm.String" />
        <Property Name="InternalComment" Type="Edm.String" />
        <Property Name="ServiceObjectId" Type="Edm.Int64" />
        <Property Name="StepListTemplateId" Type="Edm.Int64" />
        <Property Name="ParentId" Type="Edm.Int64" />
        <NavigationProperty Name="ServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner" ToRole="ServiceRequest" FromRole="ServiceRequestPartner" />
        <NavigationProperty Name="ServiceObject" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner" ToRole="ServiceObject" FromRole="ServiceObjectPartner" />
        <NavigationProperty Name="StepListTemplate" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_StepListTemplate_MFR_Domain_Api_Documents_StepListTemplate_StepListTemplatePartner" ToRole="StepListTemplate" FromRole="StepListTemplatePartner" />
        <NavigationProperty Name="Parent" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_Parent_MFR_Domain_Api_Documents_Step_ParentPartner" ToRole="Parent" FromRole="ParentPartner" />
        <NavigationProperty Name="Attachments" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_Attachments_MFR_Domain_Api_Documents_Attachment_AttachmentsPartner" ToRole="Attachments" FromRole="AttachmentsPartner" />
      </EntityType>
      <EntityType Name="ServiceObject">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Location" Type="MFR.Domain.Api.Documents.Location" />
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="Note" Type="Edm.String" />
        <Property Name="CustomValues" Type="Collection(MFR.Domain.Api.Documents.CustomValue)" Nullable="false" />
        <Property Name="DateOfCreation" Type="Edm.DateTime" Nullable="false" />
        <Property Name="DateModified" Type="Edm.DateTime" Nullable="false" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="MappingId" Type="Edm.String" />
        <Property Name="QuickSearch" Type="Edm.String" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="CreateGeoLocation" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsWarehouse" Type="Edm.Boolean" Nullable="false" />
        <Property Name="ParentServiceObjectId" Type="Edm.Int64" Nullable="false" />
        <Property Name="CompanyId" Type="Edm.Int64" Nullable="false" />
        <Property Name="ProductId" Type="Edm.Int64" Nullable="false" />
        <NavigationProperty Name="WarehouseManager" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_WarehouseManager_MFR_Domain_Api_Documents_Contact_WarehouseManagerPartner" ToRole="WarehouseManager" FromRole="WarehouseManagerPartner" />
        <NavigationProperty Name="CustomValueSteps" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_CustomValueSteps_MFR_Domain_Api_Documents_Step_CustomValueStepsPartner" ToRole="CustomValueSteps" FromRole="CustomValueStepsPartner" />
        <NavigationProperty Name="Company" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Company_MFR_Domain_Api_Documents_Company_CompanyPartner" ToRole="Company" FromRole="CompanyPartner" />
        <NavigationProperty Name="Product" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Product_MFR_Domain_Api_Documents_Product_ProductPartner" ToRole="Product" FromRole="ProductPartner" />
        <NavigationProperty Name="Tags" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Tags_MFR_Domain_Api_Documents_Tag_TagsPartner" ToRole="Tags" FromRole="TagsPartner" />
        <NavigationProperty Name="ChildServiceObject" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_ChildServiceObject_MFR_Domain_Api_Documents_ServiceObject_ChildServiceObjectPartner" ToRole="ChildServiceObject" FromRole="ChildServiceObjectPartner" />
        <NavigationProperty Name="Contacts" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner" ToRole="Contacts" FromRole="ContactsPartner" />
        <NavigationProperty Name="Items" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Items_MFR_Domain_Api_Documents_Item_ItemsPartner" ToRole="Items" FromRole="ItemsPartner" />
      </EntityType>
      <ComplexType Name="Location">
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Id" Type="Edm.Int64" />
        <Property Name="AddressString" Type="Edm.String" />
        <Property Name="Postal" Type="Edm.String" />
        <Property Name="City" Type="Edm.String" />
        <Property Name="State" Type="Edm.String" />
        <Property Name="Country" Type="Edm.String" />
        <Property Name="Longitude" Type="Edm.Double" Nullable="false" />
        <Property Name="Latitude" Type="Edm.Double" Nullable="false" />
        <Property Name="IsValidLocation" Type="Edm.Boolean" Nullable="false" />
      </ComplexType>
      <EntityType Name="StepListTemplate">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="MappingId" Type="Edm.String" />
        <Property Name="DateModified" Type="Edm.DateTime" Nullable="false" />
        <Property Name="IsReleased" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsDurable" Type="Edm.Boolean" Nullable="false" />
        <NavigationProperty Name="Steps" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StepListTemplate_Steps_MFR_Domain_Api_Documents_Step_StepsPartner" ToRole="Steps" FromRole="StepsPartner" />
      </EntityType>
      <EntityType Name="StepListTemplateInstance">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="ServiceRequestId" Type="Edm.Int64" />
        <Property Name="TemplateId" Type="Edm.Int64" />
        <NavigationProperty Name="ServiceRequest" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StepListTemplateInstance_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner" ToRole="ServiceRequest" FromRole="ServiceRequestPartner" />
        <NavigationProperty Name="Template" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StepListTemplateInstance_Template_MFR_Domain_Api_Documents_StepListTemplate_TemplatePartner" ToRole="Template" FromRole="TemplatePartner" />
      </EntityType>
      <EntityType Name="Contact">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="CustomValues" Type="Collection(MFR.Domain.Api.Documents.CustomValue)" Nullable="false" />
        <Property Name="FirstName" Type="Edm.String" />
        <Property Name="LastName" Type="Edm.String" />
        <Property Name="Email" Type="Edm.String" />
        <Property Name="JobTitle" Type="Edm.String" />
        <Property Name="MobilePhone" Type="Edm.String" />
        <Property Name="Telephone" Type="Edm.String" />
        <Property Name="Fax" Type="Edm.String" />
        <Property Name="Note" Type="Edm.String" />
        <Property Name="DateModified" Type="Edm.DateTime" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="CompanyId" Type="Edm.Int64" Nullable="false" />
        <Property Name="IsUser" Type="Edm.Boolean" Nullable="false" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="Gender" Type="Edm.String" />
        <Property Name="UserId" Type="Edm.Int64" Nullable="false" />
        <NavigationProperty Name="Company" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Contact_Company_MFR_Domain_Api_Documents_Company_CompanyPartner" ToRole="Company" FromRole="CompanyPartner" />
        <NavigationProperty Name="User" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Contact_User_MFR_Domain_Api_Documents_User_UserPartner" ToRole="User" FromRole="UserPartner" />
      </EntityType>
      <EntityType Name="Tag">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="ColorDefinition" Type="Edm.String" />
        <Property Name="Type" Type="Edm.String" Nullable="false" />
      </EntityType>
      <EntityType Name="Product">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="SubKey" Type="Edm.String" />
        <Property Name="Description" Type="Edm.String" />
        <Property Name="DateModified" Type="Edm.DateTime" Nullable="false" />
        <Property Name="MappingId" Type="Edm.String" />
        <Property Name="CustomValueStepTemplateId" Type="Edm.Int64" Nullable="false" />
        <NavigationProperty Name="CustomValueStepTemplate" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Product_CustomValueStepTemplate_MFR_Domain_Api_Documents_StepListTemplate_CustomValueStepTemplatePartner" ToRole="CustomValueStepTemplate" FromRole="CustomValueStepTemplatePartner" />
      </EntityType>
      <EntityType Name="Company">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Location" Type="MFR.Domain.Api.Documents.Location" />
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="IsPhysicalPerson" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsOwner" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsEmailInvoicingActive" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsSupplier" Type="Edm.Boolean" Nullable="false" />
        <Property Name="MappingId" Type="Edm.String" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="Note" Type="Edm.String" />
        <Property Name="SupportTelephone" Type="Edm.String" />
        <Property Name="SupportFax" Type="Edm.String" />
        <Property Name="SupportMail" Type="Edm.String" />
        <Property Name="QuickSearch" Type="Edm.String" />
        <Property Name="DateOfCreation" Type="Edm.DateTime" Nullable="false" />
        <Property Name="DateModified" Type="Edm.DateTime" Nullable="false" />
        <Property Name="CustomValues" Type="Collection(MFR.Domain.Api.Documents.CustomValue)" Nullable="false" />
        <Property Name="MainContactId" Type="Edm.Int64" Nullable="false" />
        <NavigationProperty Name="MainContact" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Company_MainContact_MFR_Domain_Api_Documents_Contact_MainContactPartner" ToRole="MainContact" FromRole="MainContactPartner" />
        <NavigationProperty Name="Tags" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Company_Tags_MFR_Domain_Api_Documents_Tag_TagsPartner" ToRole="Tags" FromRole="TagsPartner" />
        <NavigationProperty Name="Contacts" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Company_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner" ToRole="Contacts" FromRole="ContactsPartner" />
        <NavigationProperty Name="ServiceObjects" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Company_ServiceObjects_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectsPartner" ToRole="ServiceObjects" FromRole="ServiceObjectsPartner" />
      </EntityType>
      <EntityType Name="User">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="UserName" Type="Edm.String" />
        <Property Name="IsSystem" Type="Edm.Boolean" Nullable="false" />
        <Property Name="CreationDate" Type="Edm.DateTime" Nullable="false" />
        <Property Name="IsApproved" Type="Edm.Boolean" Nullable="false" />
        <Property Name="ContactId" Type="Edm.Int64" Nullable="false" />
        <Property Name="PreferedLanguage" Type="Edm.String" />
        <Property Name="EmailChannelEnabled" Type="Edm.Boolean" Nullable="false" />
        <Property Name="HasFullScreenPreference" Type="Edm.Boolean" Nullable="false" />
        <Property Name="TimeZone" Type="Edm.Int32" Nullable="false" />
        <Property Name="PreferedCulture" Type="Edm.String" />
        <Property Name="IsActive" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsMobile" Type="Edm.Boolean" Nullable="false" />
        <Property Name="LastLoginDate" Type="Edm.DateTime" />
        <Property Name="UserGuideProgress" Type="Edm.String" />
        <Property Name="DashboardSettings" Type="Edm.String" />
        <NavigationProperty Name="Contact" Relationship="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_User_Contact_MFR_Domain_Api_Documents_Contact_ContactPartner" ToRole="Contact" FromRole="ContactPartner" />
      </EntityType>
      <EntityType Name="Qualification">
        <Key>
          <PropertyRef Name="Id" />
        </Key>
        <Property Name="Id" Type="Edm.Int64" Nullable="false" />
        <Property Name="Version" Type="Edm.Int32" Nullable="false" />
        <Property Name="Name" Type="Edm.String" />
      </EntityType>
      <Association Name="MFR_Domain_Api_Documents_ItemType_Unit_MFR_Domain_Api_Documents_ItemUnit_UnitPartner">
        <End Type="MFR.Domain.Api.Documents.ItemUnit" Role="Unit" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ItemType" Role="UnitPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_CreatedBy_MFR_Domain_Api_Documents_Contact_CreatedByPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="CreatedBy" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="CreatedByPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_ClosedBy_MFR_Domain_Api_Documents_User_ClosedByPartner">
        <End Type="MFR.Domain.Api.Documents.User" Role="ClosedBy" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ClosedByPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_ReleasedBy_MFR_Domain_Api_Documents_User_ReleasedByPartner">
        <End Type="MFR.Domain.Api.Documents.User" Role="ReleasedBy" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ReleasedByPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_CostCenter_MFR_Domain_Api_Documents_CostCenter_CostCenterPartner">
        <End Type="MFR.Domain.Api.Documents.CostCenter" Role="CostCenter" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="CostCenterPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Appointments_MFR_Domain_Api_Documents_Appointment_AppointmentsPartner">
        <End Type="MFR.Domain.Api.Documents.Appointment" Role="Appointments" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="AppointmentsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Items_MFR_Domain_Api_Documents_Item_ItemsPartner">
        <End Type="MFR.Domain.Api.Documents.Item" Role="Items" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ItemsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Documents_MFR_Domain_Api_Documents_Document_DocumentsPartner">
        <End Type="MFR.Domain.Api.Documents.Document" Role="Documents" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="DocumentsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Reports_MFR_Domain_Api_Documents_Report_ReportsPartner">
        <End Type="MFR.Domain.Api.Documents.Report" Role="Reports" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ReportsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Contacts" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ContactsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_StepListTemplates_MFR_Domain_Api_Documents_StepListTemplate_StepListTemplatesPartner">
        <End Type="MFR.Domain.Api.Documents.StepListTemplate" Role="StepListTemplates" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="StepListTemplatesPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_ServiceObjects_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectsPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ServiceObjects" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceObjectsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_TimeEvents_MFR_Domain_Api_Documents_TimeEvent_TimeEventsPartner">
        <End Type="MFR.Domain.Api.Documents.TimeEvent" Role="TimeEvents" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="TimeEventsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Comments_MFR_Domain_Api_Documents_Comment_CommentsPartner">
        <End Type="MFR.Domain.Api.Documents.Comment" Role="Comments" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="CommentsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_CurrentOwner_MFR_Domain_Api_Documents_Contact_CurrentOwnerPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="CurrentOwner" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="CurrentOwnerPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Customer_MFR_Domain_Api_Documents_Company_CustomerPartner">
        <End Type="MFR.Domain.Api.Documents.Company" Role="Customer" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="CustomerPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Tags_MFR_Domain_Api_Documents_Tag_TagsPartner">
        <End Type="MFR.Domain.Api.Documents.Tag" Role="Tags" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="TagsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Steps_MFR_Domain_Api_Documents_Step_StepsPartner">
        <End Type="MFR.Domain.Api.Documents.Step" Role="Steps" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="StepsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_StockMovements_MFR_Domain_Api_Documents_StockMovement_StockMovementsPartner">
        <End Type="MFR.Domain.Api.Documents.StockMovement" Role="StockMovements" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="StockMovementsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Qualifications_MFR_Domain_Api_Documents_Qualification_QualificationsPartner">
        <End Type="MFR.Domain.Api.Documents.Qualification" Role="Qualifications" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="QualificationsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceRequest_Invoices_MFR_Domain_Api_Documents_Invoice_InvoicesPartner">
        <End Type="MFR.Domain.Api.Documents.Invoice" Role="Invoices" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="InvoicesPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Item_ItemType_MFR_Domain_Api_Documents_ItemType_ItemTypePartner">
        <End Type="MFR.Domain.Api.Documents.ItemType" Role="ItemType" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Item" Role="ItemTypePartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Item_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Item" Role="ServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Item_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ServiceObject" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Item" Role="ServiceObjectPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Item_Creator_MFR_Domain_Api_Documents_Contact_CreatorPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Creator" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Item" Role="CreatorPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Item_Unit_MFR_Domain_Api_Documents_ItemUnit_UnitPartner">
        <End Type="MFR.Domain.Api.Documents.ItemUnit" Role="Unit" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Item" Role="UnitPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_StockMovement_Item_MFR_Domain_Api_Documents_Item_ItemPartner">
        <End Type="MFR.Domain.Api.Documents.Item" Role="Item" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.StockMovement" Role="ItemPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_StockMovement_ItemType_MFR_Domain_Api_Documents_ItemType_ItemTypePartner">
        <End Type="MFR.Domain.Api.Documents.ItemType" Role="ItemType" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.StockMovement" Role="ItemTypePartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_StockMovement_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.StockMovement" Role="ServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_StockMovement_Warehouse_MFR_Domain_Api_Documents_ServiceObject_WarehousePartner">
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="Warehouse" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.StockMovement" Role="WarehousePartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_StockMovement_CreatedBy_MFR_Domain_Api_Documents_Contact_CreatedByPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="CreatedBy" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.StockMovement" Role="CreatedByPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_StockMovement_ConfirmedBy_MFR_Domain_Api_Documents_Contact_ConfirmedByPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="ConfirmedBy" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.StockMovement" Role="ConfirmedByPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_TimeEvent_Contact_MFR_Domain_Api_Documents_Contact_ContactPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Contact" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.TimeEvent" Role="ContactPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_TimeEvent_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.TimeEvent" Role="ServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Document_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Document" Role="ServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Report_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Report" Role="ServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Report_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ServiceObject" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Report" Role="ServiceObjectPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Invoice_SourceServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_SourceServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="SourceServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Invoice" Role="SourceServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Invoice_Author_MFR_Domain_Api_Documents_Contact_AuthorPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Author" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Invoice" Role="AuthorPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Invoice_Customer_MFR_Domain_Api_Documents_Company_CustomerPartner">
        <End Type="MFR.Domain.Api.Documents.Company" Role="Customer" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Invoice" Role="CustomerPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Invoice_CostCenter_MFR_Domain_Api_Documents_CostCenter_CostCenterPartner">
        <End Type="MFR.Domain.Api.Documents.CostCenter" Role="CostCenter" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Invoice" Role="CostCenterPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Invoice_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ServiceObject" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Invoice" Role="ServiceObjectPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Invoice_Dunnings_MFR_Domain_Api_Documents_Report_DunningsPartner">
        <End Type="MFR.Domain.Api.Documents.Report" Role="Dunnings" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.Invoice" Role="DunningsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Comment_Owner_MFR_Domain_Api_Documents_Contact_OwnerPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Owner" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Comment" Role="OwnerPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Comment_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Comment" Role="ServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Comment_Company_MFR_Domain_Api_Documents_Company_CompanyPartner">
        <End Type="MFR.Domain.Api.Documents.Company" Role="Company" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Comment" Role="CompanyPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Attachment_Step_MFR_Domain_Api_Documents_Step_StepPartner">
        <End Type="MFR.Domain.Api.Documents.Step" Role="Step" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Attachment" Role="StepPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Appointment_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Appointment" Role="ServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Appointment_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Contacts" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.Appointment" Role="ContactsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Appointment_Contact_MFR_Domain_Api_Documents_Contact_ContactPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Contact" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Appointment" Role="ContactPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Step_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Step" Role="ServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Step_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ServiceObject" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Step" Role="ServiceObjectPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Step_StepListTemplate_MFR_Domain_Api_Documents_StepListTemplate_StepListTemplatePartner">
        <End Type="MFR.Domain.Api.Documents.StepListTemplate" Role="StepListTemplate" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Step" Role="StepListTemplatePartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Step_Parent_MFR_Domain_Api_Documents_Step_ParentPartner">
        <End Type="MFR.Domain.Api.Documents.Step" Role="Parent" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Step" Role="ParentPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Step_Attachments_MFR_Domain_Api_Documents_Attachment_AttachmentsPartner">
        <End Type="MFR.Domain.Api.Documents.Attachment" Role="Attachments" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.Step" Role="AttachmentsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceObject_WarehouseManager_MFR_Domain_Api_Documents_Contact_WarehouseManagerPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="WarehouseManager" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="WarehouseManagerPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceObject_CustomValueSteps_MFR_Domain_Api_Documents_Step_CustomValueStepsPartner">
        <End Type="MFR.Domain.Api.Documents.Step" Role="CustomValueSteps" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="CustomValueStepsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceObject_Company_MFR_Domain_Api_Documents_Company_CompanyPartner">
        <End Type="MFR.Domain.Api.Documents.Company" Role="Company" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="CompanyPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceObject_Product_MFR_Domain_Api_Documents_Product_ProductPartner">
        <End Type="MFR.Domain.Api.Documents.Product" Role="Product" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ProductPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceObject_Tags_MFR_Domain_Api_Documents_Tag_TagsPartner">
        <End Type="MFR.Domain.Api.Documents.Tag" Role="Tags" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="TagsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceObject_ChildServiceObject_MFR_Domain_Api_Documents_ServiceObject_ChildServiceObjectPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ChildServiceObject" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ChildServiceObjectPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceObject_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Contacts" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ContactsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_ServiceObject_Items_MFR_Domain_Api_Documents_Item_ItemsPartner">
        <End Type="MFR.Domain.Api.Documents.Item" Role="Items" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ItemsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_StepListTemplate_Steps_MFR_Domain_Api_Documents_Step_StepsPartner">
        <End Type="MFR.Domain.Api.Documents.Step" Role="Steps" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.StepListTemplate" Role="StepsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_StepListTemplateInstance_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceRequest" Role="ServiceRequest" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.StepListTemplateInstance" Role="ServiceRequestPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_StepListTemplateInstance_Template_MFR_Domain_Api_Documents_StepListTemplate_TemplatePartner">
        <End Type="MFR.Domain.Api.Documents.StepListTemplate" Role="Template" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.StepListTemplateInstance" Role="TemplatePartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Contact_Company_MFR_Domain_Api_Documents_Company_CompanyPartner">
        <End Type="MFR.Domain.Api.Documents.Company" Role="Company" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Contact" Role="CompanyPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Contact_User_MFR_Domain_Api_Documents_User_UserPartner">
        <End Type="MFR.Domain.Api.Documents.User" Role="User" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Contact" Role="UserPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Product_CustomValueStepTemplate_MFR_Domain_Api_Documents_StepListTemplate_CustomValueStepTemplatePartner">
        <End Type="MFR.Domain.Api.Documents.StepListTemplate" Role="CustomValueStepTemplate" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Product" Role="CustomValueStepTemplatePartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Company_MainContact_MFR_Domain_Api_Documents_Contact_MainContactPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="MainContact" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.Company" Role="MainContactPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Company_Tags_MFR_Domain_Api_Documents_Tag_TagsPartner">
        <End Type="MFR.Domain.Api.Documents.Tag" Role="Tags" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.Company" Role="TagsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Company_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Contacts" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.Company" Role="ContactsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_Company_ServiceObjects_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectsPartner">
        <End Type="MFR.Domain.Api.Documents.ServiceObject" Role="ServiceObjects" Multiplicity="*" />
        <End Type="MFR.Domain.Api.Documents.Company" Role="ServiceObjectsPartner" Multiplicity="0..1" />
      </Association>
      <Association Name="MFR_Domain_Api_Documents_User_Contact_MFR_Domain_Api_Documents_Contact_ContactPartner">
        <End Type="MFR.Domain.Api.Documents.Contact" Role="Contact" Multiplicity="0..1" />
        <End Type="MFR.Domain.Api.Documents.User" Role="ContactPartner" Multiplicity="0..1" />
      </Association>
    </Schema>
    <Schema>
      <ComplexType Name="ServiceRequest">
        <Property Name="Name" Type="Edm.String" />
        <Property Name="Description" Type="Edm.String" />
        <Property Name="Customer" Type="MFR.Domain.Api.Documents.ServiceRequestCreation.Company" />
        <Property Name="ServiceObjects" Type="Collection(MFR.Domain.Api.Documents.ServiceRequestCreation.ServiceObject)" Nullable="false" />
        <Property Name="State" Type="Edm.String" />
        <Property Name="CreateFromServiceRequestTemplateId" Type="Edm.Int64" />
      </ComplexType>
      <ComplexType Name="Company">
        <Property Name="Id" Type="Edm.Int64" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="CreateGeoLocation" Type="Edm.Boolean" Nullable="false" />
        <Property Name="IsPhysicalPerson" Type="Edm.Boolean" />
        <Property Name="Location" Type="MFR.Domain.Api.Documents.ServiceRequestCreation.Location" />
      </ComplexType>
      <ComplexType Name="Location">
        <Property Name="CreateGeoLocation" Type="Edm.Boolean" />
        <Property Name="AddressString" Type="Edm.String" />
        <Property Name="Postal" Type="Edm.String" />
        <Property Name="City" Type="Edm.String" />
        <Property Name="Country" Type="Edm.String" />
        <Property Name="Longitude" Type="Edm.Double" Nullable="false" />
        <Property Name="Latitude" Type="Edm.Double" Nullable="false" />
      </ComplexType>
      <ComplexType Name="ServiceObject">
        <Property Name="Id" Type="Edm.Int64" />
        <Property Name="Name" Type="Edm.String" />
        <Property Name="ExternalId" Type="Edm.String" />
        <Property Name="CreateGeoLocation" Type="Edm.Boolean" Nullable="false" />
        <Property Name="Location" Type="MFR.Domain.Api.Documents.ServiceRequestCreation.Location" />
        <Property Name="Contacts" Type="Collection(MFR.Domain.Api.Documents.ServiceRequestCreation.Contact)" Nullable="false" />
      </ComplexType>
      <ComplexType Name="Contact">
        <Property Name="FirstName" Type="Edm.String" />
        <Property Name="LastName" Type="Edm.String" />
        <Property Name="Telephone" Type="Edm.String" />
        <Property Name="Mobile" Type="Edm.String" />
        <Property Name="Email" Type="Edm.String" />
      </ComplexType>
    </Schema>
    <Schema  xmlns:m="http://schemas.microsoft.com/ado/2007/08/dataservices/metadata">
      <EntityContainer Name="Container" m:IsDefaultEntityContainer="true">
        <EntitySet Name="ItemTypes" EntityType="MFR.Domain.Api.Documents.ItemType" />
        <EntitySet Name="ServiceRequests" EntityType="MFR.Domain.Api.Documents.ServiceRequest" />
        <EntitySet Name="Items" EntityType="MFR.Domain.Api.Documents.Item" />
        <EntitySet Name="StockMovements" EntityType="MFR.Domain.Api.Documents.StockMovement" />
        <EntitySet Name="CostCenters" EntityType="MFR.Domain.Api.Documents.CostCenter" />
        <EntitySet Name="ItemUnits" EntityType="MFR.Domain.Api.Documents.ItemUnit" />
        <EntitySet Name="TimeEvents" EntityType="MFR.Domain.Api.Documents.TimeEvent" />
        <EntitySet Name="Documents" EntityType="MFR.Domain.Api.Documents.Document" />
        <EntitySet Name="Reports" EntityType="MFR.Domain.Api.Documents.Report" />
        <EntitySet Name="Invoices" EntityType="MFR.Domain.Api.Documents.Invoice" />
        <EntitySet Name="Comments" EntityType="MFR.Domain.Api.Documents.Comment" />
        <EntitySet Name="Attachments" EntityType="MFR.Domain.Api.Documents.Attachment" />
        <EntitySet Name="Appointments" EntityType="MFR.Domain.Api.Documents.Appointment" />
        <EntitySet Name="Steps" EntityType="MFR.Domain.Api.Documents.Step" />
        <EntitySet Name="ServiceObjects" EntityType="MFR.Domain.Api.Documents.ServiceObject" />
        <EntitySet Name="StepListTemplates" EntityType="MFR.Domain.Api.Documents.StepListTemplate" />
        <EntitySet Name="StepListTemplateInstances" EntityType="MFR.Domain.Api.Documents.StepListTemplateInstance" />
        <EntitySet Name="Contacts" EntityType="MFR.Domain.Api.Documents.Contact" />
        <EntitySet Name="Tags" EntityType="MFR.Domain.Api.Documents.Tag" />
        <EntitySet Name="Products" EntityType="MFR.Domain.Api.Documents.Product" />
        <EntitySet Name="Companies" EntityType="MFR.Domain.Api.Documents.Company" />
        <EntitySet Name="Users" EntityType="MFR.Domain.Api.Documents.User" />
        <EntitySet Name="Qualifications" EntityType="MFR.Domain.Api.Documents.Qualification" />
        <FunctionImport Name="GenerateReportHash" ReturnType="Edm.String" IsBindable="true" m:IsAlwaysBindable="true">
          <Parameter Name="bindingParameter" Type="MFR.Domain.Api.Documents.ServiceRequest" />
          <Parameter Name="reportDefinitionId" Type="Edm.Int64" Nullable="false" />
        </FunctionImport>
        <FunctionImport Name="Deep" ReturnType="MFR.Domain.Api.Documents.ServiceRequest" IsBindable="true" EntitySet="ServiceRequests" m:IsAlwaysBindable="true">
          <Parameter Name="bindingParameter" Type="Collection(MFR.Domain.Api.Documents.ServiceRequest)" Nullable="false" />
          <Parameter Name="serviceRequest" Type="MFR.Domain.Api.Documents.ServiceRequestCreation.ServiceRequest" />
        </FunctionImport>
        <AssociationSet Name="MFR_Domain_Api_Documents_ItemType_Unit_MFR_Domain_Api_Documents_ItemUnit_UnitPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ItemType_Unit_MFR_Domain_Api_Documents_ItemUnit_UnitPartner">
          <End Role="UnitPartner" EntitySet="ItemTypes" />
          <End Role="Unit" EntitySet="ItemUnits" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_CreatedBy_MFR_Domain_Api_Documents_Contact_CreatedByPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_CreatedBy_MFR_Domain_Api_Documents_Contact_CreatedByPartner">
          <End Role="CreatedByPartner" EntitySet="ServiceRequests" />
          <End Role="CreatedBy" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_ClosedBy_MFR_Domain_Api_Documents_User_ClosedByPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_ClosedBy_MFR_Domain_Api_Documents_User_ClosedByPartner">
          <End Role="ClosedByPartner" EntitySet="ServiceRequests" />
          <End Role="ClosedBy" EntitySet="Users" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_ReleasedBy_MFR_Domain_Api_Documents_User_ReleasedByPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_ReleasedBy_MFR_Domain_Api_Documents_User_ReleasedByPartner">
          <End Role="ReleasedByPartner" EntitySet="ServiceRequests" />
          <End Role="ReleasedBy" EntitySet="Users" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_CostCenter_MFR_Domain_Api_Documents_CostCenter_CostCenterPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_CostCenter_MFR_Domain_Api_Documents_CostCenter_CostCenterPartner">
          <End Role="CostCenterPartner" EntitySet="ServiceRequests" />
          <End Role="CostCenter" EntitySet="CostCenters" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Appointments_MFR_Domain_Api_Documents_Appointment_AppointmentsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Appointments_MFR_Domain_Api_Documents_Appointment_AppointmentsPartner">
          <End Role="AppointmentsPartner" EntitySet="ServiceRequests" />
          <End Role="Appointments" EntitySet="Appointments" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Items_MFR_Domain_Api_Documents_Item_ItemsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Items_MFR_Domain_Api_Documents_Item_ItemsPartner">
          <End Role="ItemsPartner" EntitySet="ServiceRequests" />
          <End Role="Items" EntitySet="Items" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Documents_MFR_Domain_Api_Documents_Document_DocumentsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Documents_MFR_Domain_Api_Documents_Document_DocumentsPartner">
          <End Role="DocumentsPartner" EntitySet="ServiceRequests" />
          <End Role="Documents" EntitySet="Documents" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Reports_MFR_Domain_Api_Documents_Report_ReportsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Reports_MFR_Domain_Api_Documents_Report_ReportsPartner">
          <End Role="ReportsPartner" EntitySet="ServiceRequests" />
          <End Role="Reports" EntitySet="Reports" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner">
          <End Role="ContactsPartner" EntitySet="ServiceRequests" />
          <End Role="Contacts" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_StepListTemplates_MFR_Domain_Api_Documents_StepListTemplate_StepListTemplatesPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_StepListTemplates_MFR_Domain_Api_Documents_StepListTemplate_StepListTemplatesPartner">
          <End Role="StepListTemplatesPartner" EntitySet="ServiceRequests" />
          <End Role="StepListTemplates" EntitySet="StepListTemplates" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_ServiceObjects_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_ServiceObjects_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectsPartner">
          <End Role="ServiceObjectsPartner" EntitySet="ServiceRequests" />
          <End Role="ServiceObjects" EntitySet="ServiceObjects" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_TimeEvents_MFR_Domain_Api_Documents_TimeEvent_TimeEventsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_TimeEvents_MFR_Domain_Api_Documents_TimeEvent_TimeEventsPartner">
          <End Role="TimeEventsPartner" EntitySet="ServiceRequests" />
          <End Role="TimeEvents" EntitySet="TimeEvents" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Comments_MFR_Domain_Api_Documents_Comment_CommentsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Comments_MFR_Domain_Api_Documents_Comment_CommentsPartner">
          <End Role="CommentsPartner" EntitySet="ServiceRequests" />
          <End Role="Comments" EntitySet="Comments" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_CurrentOwner_MFR_Domain_Api_Documents_Contact_CurrentOwnerPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_CurrentOwner_MFR_Domain_Api_Documents_Contact_CurrentOwnerPartner">
          <End Role="CurrentOwnerPartner" EntitySet="ServiceRequests" />
          <End Role="CurrentOwner" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Customer_MFR_Domain_Api_Documents_Company_CustomerPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Customer_MFR_Domain_Api_Documents_Company_CustomerPartner">
          <End Role="CustomerPartner" EntitySet="ServiceRequests" />
          <End Role="Customer" EntitySet="Companies" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Tags_MFR_Domain_Api_Documents_Tag_TagsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Tags_MFR_Domain_Api_Documents_Tag_TagsPartner">
          <End Role="TagsPartner" EntitySet="ServiceRequests" />
          <End Role="Tags" EntitySet="Tags" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Steps_MFR_Domain_Api_Documents_Step_StepsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Steps_MFR_Domain_Api_Documents_Step_StepsPartner">
          <End Role="StepsPartner" EntitySet="ServiceRequests" />
          <End Role="Steps" EntitySet="Steps" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_StockMovements_MFR_Domain_Api_Documents_StockMovement_StockMovementsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_StockMovements_MFR_Domain_Api_Documents_StockMovement_StockMovementsPartner">
          <End Role="StockMovementsPartner" EntitySet="ServiceRequests" />
          <End Role="StockMovements" EntitySet="StockMovements" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Qualifications_MFR_Domain_Api_Documents_Qualification_QualificationsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Qualifications_MFR_Domain_Api_Documents_Qualification_QualificationsPartner">
          <End Role="QualificationsPartner" EntitySet="ServiceRequests" />
          <End Role="Qualifications" EntitySet="Qualifications" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceRequest_Invoices_MFR_Domain_Api_Documents_Invoice_InvoicesPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceRequest_Invoices_MFR_Domain_Api_Documents_Invoice_InvoicesPartner">
          <End Role="InvoicesPartner" EntitySet="ServiceRequests" />
          <End Role="Invoices" EntitySet="Invoices" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Item_ItemType_MFR_Domain_Api_Documents_ItemType_ItemTypePartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_ItemType_MFR_Domain_Api_Documents_ItemType_ItemTypePartner">
          <End Role="ItemTypePartner" EntitySet="Items" />
          <End Role="ItemType" EntitySet="ItemTypes" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Item_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
          <End Role="ServiceRequestPartner" EntitySet="Items" />
          <End Role="ServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Item_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner">
          <End Role="ServiceObjectPartner" EntitySet="Items" />
          <End Role="ServiceObject" EntitySet="ServiceObjects" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Item_Creator_MFR_Domain_Api_Documents_Contact_CreatorPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_Creator_MFR_Domain_Api_Documents_Contact_CreatorPartner">
          <End Role="CreatorPartner" EntitySet="Items" />
          <End Role="Creator" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Item_Unit_MFR_Domain_Api_Documents_ItemUnit_UnitPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Item_Unit_MFR_Domain_Api_Documents_ItemUnit_UnitPartner">
          <End Role="UnitPartner" EntitySet="Items" />
          <End Role="Unit" EntitySet="ItemUnits" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_StockMovement_Item_MFR_Domain_Api_Documents_Item_ItemPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_Item_MFR_Domain_Api_Documents_Item_ItemPartner">
          <End Role="ItemPartner" EntitySet="StockMovements" />
          <End Role="Item" EntitySet="Items" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_StockMovement_ItemType_MFR_Domain_Api_Documents_ItemType_ItemTypePartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_ItemType_MFR_Domain_Api_Documents_ItemType_ItemTypePartner">
          <End Role="ItemTypePartner" EntitySet="StockMovements" />
          <End Role="ItemType" EntitySet="ItemTypes" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_StockMovement_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
          <End Role="ServiceRequestPartner" EntitySet="StockMovements" />
          <End Role="ServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_StockMovement_Warehouse_MFR_Domain_Api_Documents_ServiceObject_WarehousePartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_Warehouse_MFR_Domain_Api_Documents_ServiceObject_WarehousePartner">
          <End Role="WarehousePartner" EntitySet="StockMovements" />
          <End Role="Warehouse" EntitySet="ServiceObjects" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_StockMovement_CreatedBy_MFR_Domain_Api_Documents_Contact_CreatedByPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_CreatedBy_MFR_Domain_Api_Documents_Contact_CreatedByPartner">
          <End Role="CreatedByPartner" EntitySet="StockMovements" />
          <End Role="CreatedBy" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_StockMovement_ConfirmedBy_MFR_Domain_Api_Documents_Contact_ConfirmedByPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StockMovement_ConfirmedBy_MFR_Domain_Api_Documents_Contact_ConfirmedByPartner">
          <End Role="ConfirmedByPartner" EntitySet="StockMovements" />
          <End Role="ConfirmedBy" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_TimeEvent_Contact_MFR_Domain_Api_Documents_Contact_ContactPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_TimeEvent_Contact_MFR_Domain_Api_Documents_Contact_ContactPartner">
          <End Role="ContactPartner" EntitySet="TimeEvents" />
          <End Role="Contact" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_TimeEvent_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_TimeEvent_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
          <End Role="ServiceRequestPartner" EntitySet="TimeEvents" />
          <End Role="ServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Document_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Document_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
          <End Role="ServiceRequestPartner" EntitySet="Documents" />
          <End Role="ServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Report_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Report_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
          <End Role="ServiceRequestPartner" EntitySet="Reports" />
          <End Role="ServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Report_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Report_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner">
          <End Role="ServiceObjectPartner" EntitySet="Reports" />
          <End Role="ServiceObject" EntitySet="ServiceObjects" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Invoice_SourceServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_SourceServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_SourceServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_SourceServiceRequestPartner">
          <End Role="SourceServiceRequestPartner" EntitySet="Invoices" />
          <End Role="SourceServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Invoice_Author_MFR_Domain_Api_Documents_Contact_AuthorPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_Author_MFR_Domain_Api_Documents_Contact_AuthorPartner">
          <End Role="AuthorPartner" EntitySet="Invoices" />
          <End Role="Author" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Invoice_Customer_MFR_Domain_Api_Documents_Company_CustomerPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_Customer_MFR_Domain_Api_Documents_Company_CustomerPartner">
          <End Role="CustomerPartner" EntitySet="Invoices" />
          <End Role="Customer" EntitySet="Companies" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Invoice_CostCenter_MFR_Domain_Api_Documents_CostCenter_CostCenterPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_CostCenter_MFR_Domain_Api_Documents_CostCenter_CostCenterPartner">
          <End Role="CostCenterPartner" EntitySet="Invoices" />
          <End Role="CostCenter" EntitySet="CostCenters" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Invoice_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner">
          <End Role="ServiceObjectPartner" EntitySet="Invoices" />
          <End Role="ServiceObject" EntitySet="ServiceObjects" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Invoice_Dunnings_MFR_Domain_Api_Documents_Report_DunningsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Invoice_Dunnings_MFR_Domain_Api_Documents_Report_DunningsPartner">
          <End Role="DunningsPartner" EntitySet="Invoices" />
          <End Role="Dunnings" EntitySet="Reports" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Comment_Owner_MFR_Domain_Api_Documents_Contact_OwnerPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Comment_Owner_MFR_Domain_Api_Documents_Contact_OwnerPartner">
          <End Role="OwnerPartner" EntitySet="Comments" />
          <End Role="Owner" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Comment_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Comment_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
          <End Role="ServiceRequestPartner" EntitySet="Comments" />
          <End Role="ServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Comment_Company_MFR_Domain_Api_Documents_Company_CompanyPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Comment_Company_MFR_Domain_Api_Documents_Company_CompanyPartner">
          <End Role="CompanyPartner" EntitySet="Comments" />
          <End Role="Company" EntitySet="Companies" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Attachment_Step_MFR_Domain_Api_Documents_Step_StepPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Attachment_Step_MFR_Domain_Api_Documents_Step_StepPartner">
          <End Role="StepPartner" EntitySet="Attachments" />
          <End Role="Step" EntitySet="Steps" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Appointment_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Appointment_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
          <End Role="ServiceRequestPartner" EntitySet="Appointments" />
          <End Role="ServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Appointment_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Appointment_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner">
          <End Role="ContactsPartner" EntitySet="Appointments" />
          <End Role="Contacts" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Appointment_Contact_MFR_Domain_Api_Documents_Contact_ContactPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Appointment_Contact_MFR_Domain_Api_Documents_Contact_ContactPartner">
          <End Role="ContactPartner" EntitySet="Appointments" />
          <End Role="Contact" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Step_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
          <End Role="ServiceRequestPartner" EntitySet="Steps" />
          <End Role="ServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Step_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_ServiceObject_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectPartner">
          <End Role="ServiceObjectPartner" EntitySet="Steps" />
          <End Role="ServiceObject" EntitySet="ServiceObjects" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Step_StepListTemplate_MFR_Domain_Api_Documents_StepListTemplate_StepListTemplatePartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_StepListTemplate_MFR_Domain_Api_Documents_StepListTemplate_StepListTemplatePartner">
          <End Role="StepListTemplatePartner" EntitySet="Steps" />
          <End Role="StepListTemplate" EntitySet="StepListTemplates" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Step_Parent_MFR_Domain_Api_Documents_Step_ParentPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_Parent_MFR_Domain_Api_Documents_Step_ParentPartner">
          <End Role="ParentPartner" EntitySet="Steps" />
          <End Role="Parent" EntitySet="Steps" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Step_Attachments_MFR_Domain_Api_Documents_Attachment_AttachmentsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Step_Attachments_MFR_Domain_Api_Documents_Attachment_AttachmentsPartner">
          <End Role="AttachmentsPartner" EntitySet="Steps" />
          <End Role="Attachments" EntitySet="Attachments" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceObject_WarehouseManager_MFR_Domain_Api_Documents_Contact_WarehouseManagerPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_WarehouseManager_MFR_Domain_Api_Documents_Contact_WarehouseManagerPartner">
          <End Role="WarehouseManagerPartner" EntitySet="ServiceObjects" />
          <End Role="WarehouseManager" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceObject_CustomValueSteps_MFR_Domain_Api_Documents_Step_CustomValueStepsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_CustomValueSteps_MFR_Domain_Api_Documents_Step_CustomValueStepsPartner">
          <End Role="CustomValueStepsPartner" EntitySet="ServiceObjects" />
          <End Role="CustomValueSteps" EntitySet="Steps" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceObject_Company_MFR_Domain_Api_Documents_Company_CompanyPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Company_MFR_Domain_Api_Documents_Company_CompanyPartner">
          <End Role="CompanyPartner" EntitySet="ServiceObjects" />
          <End Role="Company" EntitySet="Companies" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceObject_Product_MFR_Domain_Api_Documents_Product_ProductPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Product_MFR_Domain_Api_Documents_Product_ProductPartner">
          <End Role="ProductPartner" EntitySet="ServiceObjects" />
          <End Role="Product" EntitySet="Products" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceObject_Tags_MFR_Domain_Api_Documents_Tag_TagsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Tags_MFR_Domain_Api_Documents_Tag_TagsPartner">
          <End Role="TagsPartner" EntitySet="ServiceObjects" />
          <End Role="Tags" EntitySet="Tags" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceObject_ChildServiceObject_MFR_Domain_Api_Documents_ServiceObject_ChildServiceObjectPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_ChildServiceObject_MFR_Domain_Api_Documents_ServiceObject_ChildServiceObjectPartner">
          <End Role="ChildServiceObjectPartner" EntitySet="ServiceObjects" />
          <End Role="ChildServiceObject" EntitySet="ServiceObjects" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceObject_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner">
          <End Role="ContactsPartner" EntitySet="ServiceObjects" />
          <End Role="Contacts" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_ServiceObject_Items_MFR_Domain_Api_Documents_Item_ItemsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_ServiceObject_Items_MFR_Domain_Api_Documents_Item_ItemsPartner">
          <End Role="ItemsPartner" EntitySet="ServiceObjects" />
          <End Role="Items" EntitySet="Items" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_StepListTemplate_Steps_MFR_Domain_Api_Documents_Step_StepsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StepListTemplate_Steps_MFR_Domain_Api_Documents_Step_StepsPartner">
          <End Role="StepsPartner" EntitySet="StepListTemplates" />
          <End Role="Steps" EntitySet="Steps" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_StepListTemplateInstance_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StepListTemplateInstance_ServiceRequest_MFR_Domain_Api_Documents_ServiceRequest_ServiceRequestPartner">
          <End Role="ServiceRequestPartner" EntitySet="StepListTemplateInstances" />
          <End Role="ServiceRequest" EntitySet="ServiceRequests" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_StepListTemplateInstance_Template_MFR_Domain_Api_Documents_StepListTemplate_TemplatePartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_StepListTemplateInstance_Template_MFR_Domain_Api_Documents_StepListTemplate_TemplatePartner">
          <End Role="TemplatePartner" EntitySet="StepListTemplateInstances" />
          <End Role="Template" EntitySet="StepListTemplates" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Contact_Company_MFR_Domain_Api_Documents_Company_CompanyPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Contact_Company_MFR_Domain_Api_Documents_Company_CompanyPartner">
          <End Role="CompanyPartner" EntitySet="Contacts" />
          <End Role="Company" EntitySet="Companies" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Contact_User_MFR_Domain_Api_Documents_User_UserPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Contact_User_MFR_Domain_Api_Documents_User_UserPartner">
          <End Role="UserPartner" EntitySet="Contacts" />
          <End Role="User" EntitySet="Users" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Product_CustomValueStepTemplate_MFR_Domain_Api_Documents_StepListTemplate_CustomValueStepTemplatePartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Product_CustomValueStepTemplate_MFR_Domain_Api_Documents_StepListTemplate_CustomValueStepTemplatePartner">
          <End Role="CustomValueStepTemplatePartner" EntitySet="Products" />
          <End Role="CustomValueStepTemplate" EntitySet="StepListTemplates" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Company_MainContact_MFR_Domain_Api_Documents_Contact_MainContactPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Company_MainContact_MFR_Domain_Api_Documents_Contact_MainContactPartner">
          <End Role="MainContactPartner" EntitySet="Companies" />
          <End Role="MainContact" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Company_Tags_MFR_Domain_Api_Documents_Tag_TagsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Company_Tags_MFR_Domain_Api_Documents_Tag_TagsPartner">
          <End Role="TagsPartner" EntitySet="Companies" />
          <End Role="Tags" EntitySet="Tags" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Company_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Company_Contacts_MFR_Domain_Api_Documents_Contact_ContactsPartner">
          <End Role="ContactsPartner" EntitySet="Companies" />
          <End Role="Contacts" EntitySet="Contacts" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_Company_ServiceObjects_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectsPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_Company_ServiceObjects_MFR_Domain_Api_Documents_ServiceObject_ServiceObjectsPartner">
          <End Role="ServiceObjectsPartner" EntitySet="Companies" />
          <End Role="ServiceObjects" EntitySet="ServiceObjects" />
        </AssociationSet>
        <AssociationSet Name="MFR_Domain_Api_Documents_User_Contact_MFR_Domain_Api_Documents_Contact_ContactPartnerSet" Association="MFR.Domain.Api.Documents.MFR_Domain_Api_Documents_User_Contact_MFR_Domain_Api_Documents_Contact_ContactPartner">
          <End Role="ContactPartner" EntitySet="Users" />
          <End Role="Contact" EntitySet="Contacts" />
        </AssociationSet>
      </EntityContainer>
    </Schema>';

	RETURN @as;

END