﻿<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="PersonalLaundryModel.Store" Provider="System.Data.SqlClient" ProviderManifestToken="2008" Alias="Self" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm/ssdl">
  <EntityType Name="Actions">
    <Key>
      <PropertyRef Name="ActionId" />
    </Key>
    <Property Name="ActionId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="ActionDetails" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="BagReferences">
    <Key>
      <PropertyRef Name="BagReferenceId" />
    </Key>
    <Property Name="BagReferenceId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="UniqueReference" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="BillingProfiles">
    <Key>
      <PropertyRef Name="BillingProfileId" />
    </Key>
    <Property Name="BillingProfileId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="ProfileName" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IncludeRewashInInvoice" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="CustomerInventory">
    <Key>
      <PropertyRef Name="CustomerInventoryId" />
    </Key>
    <Property Name="CustomerInventoryId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="InventoryItemTypeId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
    <Property Name="CostGeneralWash" Type="int" />
    <Property Name="CostRepeatWash" Type="int" />
    <Property Name="CostStainWash" Type="int" />
    <Property Name="CostRewashWash" Type="int" />
  </EntityType>
  <EntityType Name="CustomerInventoryAudit">
    <Key>
      <PropertyRef Name="CustomerInventoryAuditId" />
    </Key>
    <Property Name="CustomerInventoryAuditId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="InventoryItemTypeId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
    <Property Name="CostGeneralWash" Type="int" />
    <Property Name="CostRepeatWash" Type="int" />
    <Property Name="CostStainWash" Type="int" />
  </EntityType>
  <EntityType Name="CustomerLoginLog">
    <Key>
      <PropertyRef Name="CustomerLoginLogId" />
    </Key>
    <Property Name="CustomerLoginLogId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="CustomerLoginId" Type="int" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
    <Property Name="IPAddress" Type="nvarchar" MaxLength="20" Nullable="false" />
    <Property Name="ActionId" Type="int" Nullable="false" />
    <Property Name="ActionDetails" Type="nvarchar" MaxLength="100" />
  </EntityType>
  <EntityType Name="CustomerLogins">
    <Key>
      <PropertyRef Name="CustomerLoginId" />
    </Key>
    <Property Name="CustomerLoginId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="GUID" Type="uniqueidentifier" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="EmailAddress" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Password" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="IsActive" Type="bit" Nullable="false" />
    <Property Name="IsLockedOut" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="Customers">
    <Key>
      <PropertyRef Name="CustomerId" />
    </Key>
    <Property Name="CustomerId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="BillingProfileId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="EmailAddress" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="EmailAddress2" Type="nvarchar" MaxLength="100" />
    <Property Name="EmailAddress3" Type="nvarchar" MaxLength="100" />
    <Property Name="ContactName" Type="nvarchar" MaxLength="50" />
    <Property Name="AddressLine1" Type="nvarchar" MaxLength="100" />
    <Property Name="AddressLine2" Type="nvarchar" MaxLength="100" />
    <Property Name="AddressCity" Type="nvarchar" MaxLength="100" />
    <Property Name="AddressPostCode" Type="nvarchar" MaxLength="100" />
    <Property Name="VATNumber" Type="nvarchar" MaxLength="50" />
    <Property Name="PastelCode" Type="nvarchar" MaxLength="50" />
    <Property Name="StainExpressPercentage" Type="float" Nullable="false" />
    <Property Name="PriceIncreasePercentage" Type="float" Nullable="false" />
    <Property Name="DoublePrintBagLabel" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="CustomerWorkloadBags">
    <Key>
      <PropertyRef Name="WorkloadBagId" />
    </Key>
    <Property Name="WorkloadBagId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="UniqueReference" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
    <Property Name="CustomerLoginId" Type="int" Nullable="false" />
    <Property Name="TimeReceived" Type="datetime" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="Dispatches">
    <Key>
      <PropertyRef Name="DispatchId" />
    </Key>
    <Property Name="DispatchId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="BagSeal" Type="nvarchar" MaxLength="200" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="DispatchStatusId" Type="int" Nullable="false" />
    <Property Name="DeliveryId" Type="int" />
    <Property Name="DateDelivered" Type="datetime" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.DispatchOperator' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="DispatchOperator">
    <Key>
      <PropertyRef Name="DeliveryId" />
      <PropertyRef Name="OperatorLoginId" />
      <PropertyRef Name="DeviceName" />
      <PropertyRef Name="LastEdit" />
    </Key>
    <Property Name="DeliveryId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="DeviceName" Type="varchar" MaxLength="100" Nullable="false" />
    <Property Name="PosPrinter" Type="varchar" MaxLength="100" />
    <Property Name="LastEdit" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="DispatchPackages">
    <Key>
      <PropertyRef Name="DispatchItemId" />
    </Key>
    <Property Name="DispatchItemId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="DispatchId" Type="int" Nullable="false" />
    <Property Name="PackageId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="DispatchStatus">
    <Key>
      <PropertyRef Name="DispatchStatusId" />
    </Key>
    <Property Name="DispatchStatusId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Status" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="DriverActions">
    <Key>
      <PropertyRef Name="DriverActionId" />
    </Key>
    <Property Name="DriverActionId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Action" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="DriverLog">
    <Key>
      <PropertyRef Name="DriverLogId" />
    </Key>
    <Property Name="DriverLogId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="DriverActionId" Type="int" Nullable="false" />
    <Property Name="LocationId" Type="int" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="InventoryItems">
    <Key>
      <PropertyRef Name="InventoryItemId" />
    </Key>
    <Property Name="InventoryItemId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="InventoryItemTypeId" Type="int" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="UniqueId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="InventoryItemTypeCategories">
    <Key>
      <PropertyRef Name="InventoryItemTypeCategoryId" />
    </Key>
    <Property Name="InventoryItemTypeCategoryId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="OrderPriority" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="InventoryItemTypes">
    <Key>
      <PropertyRef Name="InventoryItemTypeId" />
    </Key>
    <Property Name="InventoryItemTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="InventoryItemTypeCategoryId" Type="int" Nullable="false" />
    <Property Name="InventoryItemTypeSizeId" Type="int" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
  </EntityType>
  <EntityType Name="InventoryItemTypeSize">
    <Key>
      <PropertyRef Name="InventoryItemTypeSizeId" />
    </Key>
    <Property Name="InventoryItemTypeSizeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Size" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="OrderPriority" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="InvoiceBags">
    <Key>
      <PropertyRef Name="InvoiceBagId" />
    </Key>
    <Property Name="InvoiceBagId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="BagReferenceId" Type="int" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="InvoiceItems">
    <Key>
      <PropertyRef Name="InvoiceItemId" />
    </Key>
    <Property Name="InvoiceItemId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="InventoryItemTypeId" Type="int" Nullable="false" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
    <Property Name="Cost" Type="int" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="BadCount" Type="int" />
    <Property Name="CondemnedPrinted" Type="int" />
  </EntityType>
  <EntityType Name="Invoices">
    <Key>
      <PropertyRef Name="InvoiceId" />
    </Key>
    <Property Name="InvoiceId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="InvoiceStatusId" Type="int" Nullable="false" />
    <Property Name="Printed" Type="bit" />
  </EntityType>
  <EntityType Name="InvoiceStatus">
    <Key>
      <PropertyRef Name="InvoiceStatusId" />
    </Key>
    <Property Name="InvoiceStatusId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Status" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="Locations">
    <Key>
      <PropertyRef Name="LocationId" />
    </Key>
    <Property Name="LocationId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Address" Type="nvarchar" MaxLength="500" />
    <Property Name="Lat" Type="float" Nullable="false" />
    <Property Name="Lng" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="OperatorLogins">
    <Key>
      <PropertyRef Name="OperatorLoginId" />
    </Key>
    <Property Name="OperatorLoginId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Username" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Password" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="OperatorRoleId" Type="int" Nullable="false" />
    <Property Name="OperatorShift" Type="nvarchar" MaxLength="2" Nullable="false" />
    <Property Name="Fingerprint" Type="varbinary(max)" />
  </EntityType>
  <EntityType Name="OperatorRoles">
    <Key>
      <PropertyRef Name="OperatorRoleId" />
    </Key>
    <Property Name="OperatorRoleId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="RoleName" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="CanLogin" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="Packages">
    <Key>
      <PropertyRef Name="PackageId" />
    </Key>
    <Property Name="PackageId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="InvoiceItemId" Type="int" Nullable="false" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
    <Property Name="ItemCountStain" Type="int" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Settings">
    <Key>
      <PropertyRef Name="SettingId" />
    </Key>
    <Property Name="SettingId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="SettingName" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="SettingValue" Type="nvarchar(max)" />
  </EntityType>
  <EntityType Name="sysdiagrams">
    <Key>
      <PropertyRef Name="diagram_id" />
    </Key>
    <Property Name="name" Type="nvarchar" MaxLength="128" Nullable="false" />
    <Property Name="principal_id" Type="int" Nullable="false" />
    <Property Name="diagram_id" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="version" Type="int" />
    <Property Name="definition" Type="varbinary(max)" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.VAT' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="VAT">
    <Key>
      <PropertyRef Name="VAT" />
    </Key>
    <Property Name="VAT" Type="float" Nullable="false" />
  </EntityType>
  <EntityType Name="WorkloadItems">
    <Key>
      <PropertyRef Name="WorkloadItemId" />
    </Key>
    <Property Name="WorkloadItemId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="CustomerInventoryId" Type="int" Nullable="false" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
    <Property Name="CustomerLoginId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="WorkloadItemsAudit">
    <Key>
      <PropertyRef Name="WorkloadItemAuditId" />
    </Key>
    <Property Name="WorkloadItemAuditId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="CustomerInventoryId" Type="int" Nullable="false" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
    <Property Name="CustomerLoginId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
  </EntityType>
  <EntityType Name="Workloads">
    <Key>
      <PropertyRef Name="WorkloadId" />
    </Key>
    <Property Name="WorkloadId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="CustomerLoginId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="WorkloadStatusId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="WorkloadTypeId" Type="int" Nullable="false" />
    <Property Name="Reference" Type="nvarchar" MaxLength="50" />
    <Property Name="OperatorAuthoriseId" Type="int" Nullable="false" />
    <Property Name="TotalBags" Type="int" />
  </EntityType>
  <EntityType Name="WorkloadsAudit">
    <Key>
      <PropertyRef Name="WorkloadAuditId" />
    </Key>
    <Property Name="WorkloadAuditId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="CustomerLoginId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="WorkloadStatusId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="WorkloadTypeId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="WorkloadStatus">
    <Key>
      <PropertyRef Name="WorkloadStatusId" />
    </Key>
    <Property Name="WorkloadStatusId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Status" Type="nvarchar" MaxLength="50" Nullable="false" />
  </EntityType>
  <EntityType Name="WorkloadTypes">
    <Key>
      <PropertyRef Name="WorkloadTypeId" />
    </Key>
    <Property Name="WorkloadTypeId" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Type" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="CanStartCycle" Type="bit" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwClosedCustomerWorkloads' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwClosedCustomerWorkloads">
    <Key>
      <PropertyRef Name="WorkloadItemId" />
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="CustomerInventoryId" />
      <PropertyRef Name="ItemCount" />
      <PropertyRef Name="CustomerLoginId" />
      <PropertyRef Name="OperatorLoginId" />
      <PropertyRef Name="TimeStamp" />
    </Key>
    <Property Name="WorkloadItemId" Type="int" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="CustomerInventoryId" Type="int" Nullable="false" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
    <Property Name="CustomerLoginId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwCustomerBagsReadyToDispatch' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwCustomerBagsReadyToDispatch">
    <Key>
      <PropertyRef Name="CustomerId" />
      <PropertyRef Name="DispatchId" />
      <PropertyRef Name="BagSeal" />
      <PropertyRef Name="Name" />
      <PropertyRef Name="WorkloadId" />
    </Key>
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="DispatchId" Type="int" Nullable="false" />
    <Property Name="BagSeal" Type="nvarchar" MaxLength="200" Nullable="false" />
    <Property Name="DispatchPackagesCount" Type="int" />
    <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwCustomerBagsWaitingCounting' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwCustomerBagsWaitingCounting">
    <Key>
      <PropertyRef Name="CustomerId" />
      <PropertyRef Name="Name" />
    </Key>
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="BagCount" Type="int" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwCustomerInventory' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwCustomerInventory">
    <Key>
      <PropertyRef Name="CustomerId" />
      <PropertyRef Name="CustomerInventoryId" />
      <PropertyRef Name="Category" />
      <PropertyRef Name="ItemType" />
      <PropertyRef Name="Size" />
      <PropertyRef Name="TCOrderPriority" />
      <PropertyRef Name="TSOrderPriority" />
    </Key>
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="CustomerInventoryId" Type="int" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Size" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="TCOrderPriority" Type="int" Nullable="false" />
    <Property Name="TSOrderPriority" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwCustomerInventoryForWorkload' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwCustomerInventoryForWorkload">
    <Key>
      <PropertyRef Name="CustomerId" />
      <PropertyRef Name="CustomerInventoryId" />
      <PropertyRef Name="Category" />
      <PropertyRef Name="ItemType" />
      <PropertyRef Name="Size" />
      <PropertyRef Name="TCOrderPriority" />
      <PropertyRef Name="TSOrderPriority" />
    </Key>
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="CustomerInventoryId" Type="int" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Size" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="TCOrderPriority" Type="int" Nullable="false" />
    <Property Name="TSOrderPriority" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwCustomerInventoryWorkload' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwCustomerInventoryWorkload">
    <Key>
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="InventoryItemTypeId" />
      <PropertyRef Name="ItemCount" />
    </Key>
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="InventoryItemTypeId" Type="int" Nullable="false" />
    <Property Name="CostGeneralWash" Type="int" />
    <Property Name="CostRepeatWash" Type="int" />
    <Property Name="CostStainWash" Type="int" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwDeliveryNoteCategoriesByBagSeal' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwDeliveryNoteCategoriesByBagSeal">
    <Key>
      <PropertyRef Name="DispatchId" />
      <PropertyRef Name="InvoiceId" />
      <PropertyRef Name="BagSeal" />
    </Key>
    <Property Name="DispatchId" Type="int" Nullable="false" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="BagSeal" Type="nvarchar" MaxLength="200" Nullable="false" />
    <Property Name="Categories" Type="nvarchar(max)" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwDeliveryNoteCategoriesByBagSeal2' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwDeliveryNoteCategoriesByBagSeal2">
    <Key>
      <PropertyRef Name="DispatchId" />
      <PropertyRef Name="InvoiceId" />
      <PropertyRef Name="BagSeal" />
      <PropertyRef Name="WorkloadId" />
    </Key>
    <Property Name="DispatchId" Type="int" Nullable="false" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="BagSeal" Type="nvarchar" MaxLength="200" Nullable="false" />
    <Property Name="Categories" Type="nvarchar(max)" />
    <Property Name="WorkloadId" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="DeliveryId" Type="int" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwDispatchBagPackageContents' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwDispatchBagPackageContents">
    <Key>
      <PropertyRef Name="DispatchId" />
      <PropertyRef Name="PackageId" />
      <PropertyRef Name="ItemType" />
      <PropertyRef Name="Category" />
      <PropertyRef Name="Category_OrderPriority" />
      <PropertyRef Name="Size" />
      <PropertyRef Name="Size_OrderPriority" />
    </Key>
    <Property Name="DispatchId" Type="int" Nullable="false" />
    <Property Name="PackageId" Type="int" Nullable="false" />
    <Property Name="BagNumber" Type="bigint" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Category_OrderPriority" Type="int" Nullable="false" />
    <Property Name="Size" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Size_OrderPriority" Type="int" Nullable="false" />
    <Property Name="ItemCount" Type="int" />
    <Property Name="ItemCountStain" Type="int" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwDispatchesOutForDelivery' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwDispatchesOutForDelivery">
    <Key>
      <PropertyRef Name="InvoiceId" />
    </Key>
    <Property Name="InvoiceId" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwDispatchesReadyToPrint' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwDispatchesReadyToPrint">
    <Key>
      <PropertyRef Name="CustomerId" />
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="DateCreated" />
    </Key>
    <Property Name="DeliveryId" Type="int" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="DateDelivered" Type="datetime" />
    <Property Name="Dispatch" Type="varchar" MaxLength="73" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwExcelDataDump' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwExcelDataDump">
    <Key>
      <PropertyRef Name="Name" />
      <PropertyRef Name="Type" />
      <PropertyRef Name="ItemType" />
      <PropertyRef Name="ItemCount" />
    </Key>
    <Property Name="Date" Type="date" />
    <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Type" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Size" Type="nvarchar" MaxLength="50" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwInventoryItems' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwInventoryItems">
    <Key>
      <PropertyRef Name="InventoryItemTypeId" />
      <PropertyRef Name="ItemType" />
      <PropertyRef Name="Category" />
      <PropertyRef Name="Size" />
      <PropertyRef Name="Categories_OrderPriority" />
      <PropertyRef Name="Size_OrderPriority" />
    </Key>
    <Property Name="InventoryItemTypeId" Type="int" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Size" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Categories_OrderPriority" Type="int" Nullable="false" />
    <Property Name="Size_OrderPriority" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwInventoryItemTypes' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwInventoryItemTypes">
    <Key>
      <PropertyRef Name="Category" />
      <PropertyRef Name="ItemType" />
    </Key>
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwInvoiceBagSealCategories' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwInvoiceBagSealCategories">
    <Key>
      <PropertyRef Name="DispatchId" />
      <PropertyRef Name="InvoiceId" />
      <PropertyRef Name="BagSeal" />
      <PropertyRef Name="Category" />
    </Key>
    <Property Name="DispatchId" Type="int" Nullable="false" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="BagSeal" Type="nvarchar" MaxLength="200" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="DeliveryId" Type="int" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwInvoiceCountsCondemned' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwInvoiceCountsCondemned">
    <Key>
      <PropertyRef Name="InvoiceId" />
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="InventoryItemTypeId" />
      <PropertyRef Name="ItemType" />
      <PropertyRef Name="Category" />
      <PropertyRef Name="Size" />
      <PropertyRef Name="Categories_OrderPriority" />
      <PropertyRef Name="Size_OrderPriority" />
    </Key>
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="InventoryItemTypeId" Type="int" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Size" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="InvoiceBadCount" Type="int" />
    <Property Name="CustomerItemCount" Type="int" />
    <Property Name="Cost" Type="int" />
    <Property Name="CostGeneralWash" Type="int" />
    <Property Name="CostRepeatWash" Type="int" />
    <Property Name="CostStainWash" Type="int" />
    <Property Name="Categories_OrderPriority" Type="int" Nullable="false" />
    <Property Name="Size_OrderPriority" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwInvoiceCountsRecon' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwInvoiceCountsRecon">
    <Key>
      <PropertyRef Name="InvoiceId" />
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="InventoryItemTypeId" />
      <PropertyRef Name="ItemType" />
      <PropertyRef Name="Category" />
      <PropertyRef Name="Size" />
      <PropertyRef Name="InvoiceItemCount" />
      <PropertyRef Name="Categories_OrderPriority" />
      <PropertyRef Name="Size_OrderPriority" />
    </Key>
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="InventoryItemTypeId" Type="int" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Size" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="InvoiceItemCount" Type="int" Nullable="false" />
    <Property Name="CustomerItemCount" Type="int" />
    <Property Name="Cost" Type="int" />
    <Property Name="CostGeneralWash" Type="int" />
    <Property Name="CostRepeatWash" Type="int" />
    <Property Name="CostStainWash" Type="int" />
    <Property Name="Categories_OrderPriority" Type="int" Nullable="false" />
    <Property Name="Size_OrderPriority" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwInvoiceItemCounts' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwInvoiceItemCounts">
    <Key>
      <PropertyRef Name="InvoiceId" />
      <PropertyRef Name="Name" />
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="DateCreated" />
    </Key>
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="Name" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="ItemCount" Type="int" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwInvoicesReadyToPrint' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwInvoicesReadyToPrint">
    <Key>
      <PropertyRef Name="CustomerId" />
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="DateCreated" />
      <PropertyRef Name="OperatorLoginId" />
      <PropertyRef Name="InvoiceStatusId" />
      <PropertyRef Name="InvoiceId" />
    </Key>
    <Property Name="Id" Type="int" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="InvoiceStatusId" Type="int" Nullable="false" />
    <Property Name="InvoiceType" Type="varchar" MaxLength="8" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwInvoicesReadyToPrint2' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwInvoicesReadyToPrint2">
    <Key>
      <PropertyRef Name="Id" />
      <PropertyRef Name="CustomerId" />
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="DateCreated" />
      <PropertyRef Name="OperatorLoginId" />
      <PropertyRef Name="InvoiceStatusId" />
      <PropertyRef Name="InvoiceType" />
      <PropertyRef Name="InvoiceId" />
      <PropertyRef Name="Printed" />
    </Key>
    <Property Name="Id" Type="int" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="InvoiceStatusId" Type="int" Nullable="false" />
    <Property Name="InvoiceType" Type="varchar" MaxLength="8" Nullable="false" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="Invoice" Type="varchar" MaxLength="73" />
    <Property Name="Printed" Type="bit" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwOpenCustomerWorkloads' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwOpenCustomerWorkloads">
    <Key>
      <PropertyRef Name="WorkloadItemId" />
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="CustomerInventoryId" />
      <PropertyRef Name="ItemCount" />
      <PropertyRef Name="CustomerLoginId" />
      <PropertyRef Name="OperatorLoginId" />
      <PropertyRef Name="TimeStamp" />
    </Key>
    <Property Name="WorkloadItemId" Type="int" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="CustomerInventoryId" Type="int" Nullable="false" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
    <Property Name="CustomerLoginId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="TimeStamp" Type="datetime" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwPackageContents' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwPackageContents">
    <Key>
      <PropertyRef Name="PackageId" />
      <PropertyRef Name="InvoiceId" />
      <PropertyRef Name="WorkloadId" />
    </Key>
    <Property Name="PackageId" Type="int" Nullable="false" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="Description" Type="nvarchar" MaxLength="303" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwPackagesReadyForDispatch' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwPackagesReadyForDispatch">
    <Key>
      <PropertyRef Name="PackageId" />
      <PropertyRef Name="InvoiceItemId" />
      <PropertyRef Name="ItemCount" />
      <PropertyRef Name="OperatorLoginId" />
      <PropertyRef Name="DateCreated" />
    </Key>
    <Property Name="PackageId" Type="int" Nullable="false" />
    <Property Name="InvoiceItemId" Type="int" Nullable="false" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwWorkloadCategoryTypeCounts' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwWorkloadCategoryTypeCounts">
    <Key>
      <PropertyRef Name="WorkloadId" />
      <PropertyRef Name="Category" />
      <PropertyRef Name="ItemType" />
    </Key>
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="Category" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="ItemCount" Type="int" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwWorkloadStatusReport' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwWorkloadStatusReport">
    <Key>
      <PropertyRef Name="WorkloadStatusId" />
      <PropertyRef Name="Status" />
    </Key>
    <Property Name="WorkloadStatusId" Type="int" Nullable="false" />
    <Property Name="Status" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Customers" Type="int" />
    <Property Name="TotalItems" Type="int" />
  </EntityType>
  <!--Errors Found During Generation:
warning 6002: The table/view 'PersonalLaundry.dbo.vwWorkloadStatusReportWithCounts' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view.-->
  <EntityType Name="vwWorkloadStatusReportWithCounts">
    <Key>
      <PropertyRef Name="WorkloadStatusId" />
      <PropertyRef Name="Status" />
    </Key>
    <Property Name="WorkloadStatusId" Type="int" Nullable="false" />
    <Property Name="Status" Type="nvarchar" MaxLength="50" Nullable="false" />
    <Property Name="Customers" Type="int" />
    <Property Name="Bags" Type="int" />
    <Property Name="Items" Type="int" />
  </EntityType>
  <Association Name="FK_BagReferences_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="BagReferences" Type="Self.BagReferences" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="BagReferences">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerInventory_Customer">
    <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
    <End Role="CustomerInventory" Type="Self.CustomerInventory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customers">
        <PropertyRef Name="CustomerId" />
      </Principal>
      <Dependent Role="CustomerInventory">
        <PropertyRef Name="CustomerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerInventory_InventoryItemTypes">
    <End Role="InventoryItemTypes" Type="Self.InventoryItemTypes" Multiplicity="1" />
    <End Role="CustomerInventory" Type="Self.CustomerInventory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InventoryItemTypes">
        <PropertyRef Name="InventoryItemTypeId" />
      </Principal>
      <Dependent Role="CustomerInventory">
        <PropertyRef Name="InventoryItemTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerInventory_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="CustomerInventory" Type="Self.CustomerInventory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="CustomerInventory">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerInventoryAudit_Customers">
    <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
    <End Role="CustomerInventoryAudit" Type="Self.CustomerInventoryAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customers">
        <PropertyRef Name="CustomerId" />
      </Principal>
      <Dependent Role="CustomerInventoryAudit">
        <PropertyRef Name="CustomerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerInventoryAudit_InventoryItems">
    <End Role="InventoryItemTypes" Type="Self.InventoryItemTypes" Multiplicity="1" />
    <End Role="CustomerInventoryAudit" Type="Self.CustomerInventoryAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InventoryItemTypes">
        <PropertyRef Name="InventoryItemTypeId" />
      </Principal>
      <Dependent Role="CustomerInventoryAudit">
        <PropertyRef Name="InventoryItemTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerInventoryAudit_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="CustomerInventoryAudit" Type="Self.CustomerInventoryAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="CustomerInventoryAudit">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerLoginLog_Actions">
    <End Role="Actions" Type="Self.Actions" Multiplicity="1" />
    <End Role="CustomerLoginLog" Type="Self.CustomerLoginLog" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Actions">
        <PropertyRef Name="ActionId" />
      </Principal>
      <Dependent Role="CustomerLoginLog">
        <PropertyRef Name="ActionId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerLogins_Customers">
    <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
    <End Role="CustomerLogins" Type="Self.CustomerLogins" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customers">
        <PropertyRef Name="CustomerId" />
      </Principal>
      <Dependent Role="CustomerLogins">
        <PropertyRef Name="CustomerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Customers_BillingProfiles">
    <End Role="BillingProfiles" Type="Self.BillingProfiles" Multiplicity="1" />
    <End Role="Customers" Type="Self.Customers" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BillingProfiles">
        <PropertyRef Name="BillingProfileId" />
      </Principal>
      <Dependent Role="Customers">
        <PropertyRef Name="BillingProfileId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Customers_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="Customers" Type="Self.Customers" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="Customers">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Dispatches_DispatchStatus">
    <End Role="DispatchStatus" Type="Self.DispatchStatus" Multiplicity="1" />
    <End Role="Dispatches" Type="Self.Dispatches" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="DispatchStatus">
        <PropertyRef Name="DispatchStatusId" />
      </Principal>
      <Dependent Role="Dispatches">
        <PropertyRef Name="DispatchStatusId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Dispatches_Invoices">
    <End Role="Invoices" Type="Self.Invoices" Multiplicity="1" />
    <End Role="Dispatches" Type="Self.Dispatches" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Invoices">
        <PropertyRef Name="InvoiceId" />
      </Principal>
      <Dependent Role="Dispatches">
        <PropertyRef Name="InvoiceId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Dispatches_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="Dispatches" Type="Self.Dispatches" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="Dispatches">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_DispatchItems_Dispatches">
    <End Role="Dispatches" Type="Self.Dispatches" Multiplicity="1" />
    <End Role="DispatchPackages" Type="Self.DispatchPackages" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Dispatches">
        <PropertyRef Name="DispatchId" />
      </Principal>
      <Dependent Role="DispatchPackages">
        <PropertyRef Name="DispatchId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_DispatchItems_Packages">
    <End Role="Packages" Type="Self.Packages" Multiplicity="1" />
    <End Role="DispatchPackages" Type="Self.DispatchPackages" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Packages">
        <PropertyRef Name="PackageId" />
      </Principal>
      <Dependent Role="DispatchPackages">
        <PropertyRef Name="PackageId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_DriverLog_Customers">
    <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
    <End Role="DriverLog" Type="Self.DriverLog" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customers">
        <PropertyRef Name="CustomerId" />
      </Principal>
      <Dependent Role="DriverLog">
        <PropertyRef Name="CustomerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_DriverLog_DriverActions">
    <End Role="DriverActions" Type="Self.DriverActions" Multiplicity="1" />
    <End Role="DriverLog" Type="Self.DriverLog" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="DriverActions">
        <PropertyRef Name="DriverActionId" />
      </Principal>
      <Dependent Role="DriverLog">
        <PropertyRef Name="DriverActionId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_DriverLog_Locations">
    <End Role="Locations" Type="Self.Locations" Multiplicity="1" />
    <End Role="DriverLog" Type="Self.DriverLog" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Locations">
        <PropertyRef Name="LocationId" />
      </Principal>
      <Dependent Role="DriverLog">
        <PropertyRef Name="LocationId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_DriverLog_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="DriverLog" Type="Self.DriverLog" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="DriverLog">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InventoryItems_Customers">
    <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
    <End Role="InventoryItems" Type="Self.InventoryItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customers">
        <PropertyRef Name="CustomerId" />
      </Principal>
      <Dependent Role="InventoryItems">
        <PropertyRef Name="CustomerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InventoryItems_InventoryItemTypes">
    <End Role="InventoryItemTypes" Type="Self.InventoryItemTypes" Multiplicity="1" />
    <End Role="InventoryItems" Type="Self.InventoryItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InventoryItemTypes">
        <PropertyRef Name="InventoryItemTypeId" />
      </Principal>
      <Dependent Role="InventoryItems">
        <PropertyRef Name="InventoryItemTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InventoryItemTypes_InventoryItemTypeCategories">
    <End Role="InventoryItemTypeCategories" Type="Self.InventoryItemTypeCategories" Multiplicity="1" />
    <End Role="InventoryItemTypes" Type="Self.InventoryItemTypes" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InventoryItemTypeCategories">
        <PropertyRef Name="InventoryItemTypeCategoryId" />
      </Principal>
      <Dependent Role="InventoryItemTypes">
        <PropertyRef Name="InventoryItemTypeCategoryId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InventoryItemTypes_InventoryItemTypeSize">
    <End Role="InventoryItemTypeSize" Type="Self.InventoryItemTypeSize" Multiplicity="1" />
    <End Role="InventoryItemTypes" Type="Self.InventoryItemTypes" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InventoryItemTypeSize">
        <PropertyRef Name="InventoryItemTypeSizeId" />
      </Principal>
      <Dependent Role="InventoryItemTypes">
        <PropertyRef Name="InventoryItemTypeSizeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InvoiceBags_BagReferences">
    <End Role="BagReferences" Type="Self.BagReferences" Multiplicity="1" />
    <End Role="InvoiceBags" Type="Self.InvoiceBags" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="BagReferences">
        <PropertyRef Name="BagReferenceId" />
      </Principal>
      <Dependent Role="InvoiceBags">
        <PropertyRef Name="BagReferenceId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InvoiceBags_Invoices">
    <End Role="Invoices" Type="Self.Invoices" Multiplicity="1" />
    <End Role="InvoiceBags" Type="Self.InvoiceBags" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Invoices">
        <PropertyRef Name="InvoiceId" />
      </Principal>
      <Dependent Role="InvoiceBags">
        <PropertyRef Name="InvoiceId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InvoiceBags_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="InvoiceBags" Type="Self.InvoiceBags" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="InvoiceBags">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InvoiceItems_InventoryItemTypes">
    <End Role="InventoryItemTypes" Type="Self.InventoryItemTypes" Multiplicity="1" />
    <End Role="InvoiceItems" Type="Self.InvoiceItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InventoryItemTypes">
        <PropertyRef Name="InventoryItemTypeId" />
      </Principal>
      <Dependent Role="InvoiceItems">
        <PropertyRef Name="InventoryItemTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InvoiceItems_Invoices">
    <End Role="Invoices" Type="Self.Invoices" Multiplicity="1" />
    <End Role="InvoiceItems" Type="Self.InvoiceItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Invoices">
        <PropertyRef Name="InvoiceId" />
      </Principal>
      <Dependent Role="InvoiceItems">
        <PropertyRef Name="InvoiceId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InvoiceItems_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="InvoiceItems" Type="Self.InvoiceItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="InvoiceItems">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Invoices_Customers">
    <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
    <End Role="Invoices" Type="Self.Invoices" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customers">
        <PropertyRef Name="CustomerId" />
      </Principal>
      <Dependent Role="Invoices">
        <PropertyRef Name="CustomerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Invoices_InvoiceStatus">
    <End Role="InvoiceStatus" Type="Self.InvoiceStatus" Multiplicity="1" />
    <End Role="Invoices" Type="Self.Invoices" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InvoiceStatus">
        <PropertyRef Name="InvoiceStatusId" />
      </Principal>
      <Dependent Role="Invoices">
        <PropertyRef Name="InvoiceStatusId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Invoices_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="Invoices" Type="Self.Invoices" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="Invoices">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Invoices_Workloads">
    <End Role="Workloads" Type="Self.Workloads" Multiplicity="1" />
    <End Role="Invoices" Type="Self.Invoices" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Workloads">
        <PropertyRef Name="WorkloadId" />
      </Principal>
      <Dependent Role="Invoices">
        <PropertyRef Name="WorkloadId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_OperatorLogins_OperatorRoles">
    <End Role="OperatorRoles" Type="Self.OperatorRoles" Multiplicity="1" />
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorRoles">
        <PropertyRef Name="OperatorRoleId" />
      </Principal>
      <Dependent Role="OperatorLogins">
        <PropertyRef Name="OperatorRoleId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Packages_InvoiceItems">
    <End Role="InvoiceItems" Type="Self.InvoiceItems" Multiplicity="1" />
    <End Role="Packages" Type="Self.Packages" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InvoiceItems">
        <PropertyRef Name="InvoiceItemId" />
      </Principal>
      <Dependent Role="Packages">
        <PropertyRef Name="InvoiceItemId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Packages_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="Packages" Type="Self.Packages" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="Packages">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadBags_CustomerLogins">
    <End Role="CustomerLogins" Type="Self.CustomerLogins" Multiplicity="1" />
    <End Role="CustomerWorkloadBags" Type="Self.CustomerWorkloadBags" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CustomerLogins">
        <PropertyRef Name="CustomerLoginId" />
      </Principal>
      <Dependent Role="CustomerWorkloadBags">
        <PropertyRef Name="CustomerLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadBags_Workloads">
    <End Role="Workloads" Type="Self.Workloads" Multiplicity="1" />
    <End Role="CustomerWorkloadBags" Type="Self.CustomerWorkloadBags" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Workloads">
        <PropertyRef Name="WorkloadId" />
      </Principal>
      <Dependent Role="CustomerWorkloadBags">
        <PropertyRef Name="WorkloadId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadItems_CustomerInventory">
    <End Role="CustomerInventory" Type="Self.CustomerInventory" Multiplicity="1" />
    <End Role="WorkloadItems" Type="Self.WorkloadItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CustomerInventory">
        <PropertyRef Name="CustomerInventoryId" />
      </Principal>
      <Dependent Role="WorkloadItems">
        <PropertyRef Name="CustomerInventoryId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadItems_CustomerLogins">
    <End Role="CustomerLogins" Type="Self.CustomerLogins" Multiplicity="1" />
    <End Role="WorkloadItems" Type="Self.WorkloadItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CustomerLogins">
        <PropertyRef Name="CustomerLoginId" />
      </Principal>
      <Dependent Role="WorkloadItems">
        <PropertyRef Name="CustomerLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadItems_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="WorkloadItems" Type="Self.WorkloadItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="WorkloadItems">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadItems_Workloads">
    <End Role="Workloads" Type="Self.Workloads" Multiplicity="1" />
    <End Role="WorkloadItems" Type="Self.WorkloadItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Workloads">
        <PropertyRef Name="WorkloadId" />
      </Principal>
      <Dependent Role="WorkloadItems">
        <PropertyRef Name="WorkloadId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadItemsAudit_CustomerInventory">
    <End Role="CustomerInventory" Type="Self.CustomerInventory" Multiplicity="1" />
    <End Role="WorkloadItemsAudit" Type="Self.WorkloadItemsAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CustomerInventory">
        <PropertyRef Name="CustomerInventoryId" />
      </Principal>
      <Dependent Role="WorkloadItemsAudit">
        <PropertyRef Name="CustomerInventoryId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadItemsAudit_CustomerLogins">
    <End Role="CustomerLogins" Type="Self.CustomerLogins" Multiplicity="1" />
    <End Role="WorkloadItemsAudit" Type="Self.WorkloadItemsAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CustomerLogins">
        <PropertyRef Name="CustomerLoginId" />
      </Principal>
      <Dependent Role="WorkloadItemsAudit">
        <PropertyRef Name="CustomerLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadItemsAudit_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="WorkloadItemsAudit" Type="Self.WorkloadItemsAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="WorkloadItemsAudit">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadItemsAudit_Workloads">
    <End Role="Workloads" Type="Self.Workloads" Multiplicity="1" />
    <End Role="WorkloadItemsAudit" Type="Self.WorkloadItemsAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Workloads">
        <PropertyRef Name="WorkloadId" />
      </Principal>
      <Dependent Role="WorkloadItemsAudit">
        <PropertyRef Name="WorkloadId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Workloads_CustomerLogins">
    <End Role="CustomerLogins" Type="Self.CustomerLogins" Multiplicity="1" />
    <End Role="Workloads" Type="Self.Workloads" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CustomerLogins">
        <PropertyRef Name="CustomerLoginId" />
      </Principal>
      <Dependent Role="Workloads">
        <PropertyRef Name="CustomerLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Workloads_Customers">
    <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
    <End Role="Workloads" Type="Self.Workloads" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customers">
        <PropertyRef Name="CustomerId" />
      </Principal>
      <Dependent Role="Workloads">
        <PropertyRef Name="CustomerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Workloads_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="Workloads" Type="Self.Workloads" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="Workloads">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Workloads_WorkloadStatus">
    <End Role="WorkloadStatus" Type="Self.WorkloadStatus" Multiplicity="1" />
    <End Role="Workloads" Type="Self.Workloads" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="WorkloadStatus">
        <PropertyRef Name="WorkloadStatusId" />
      </Principal>
      <Dependent Role="Workloads">
        <PropertyRef Name="WorkloadStatusId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Workloads_WorkloadTypes">
    <End Role="WorkloadTypes" Type="Self.WorkloadTypes" Multiplicity="1" />
    <End Role="Workloads" Type="Self.Workloads" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="WorkloadTypes">
        <PropertyRef Name="WorkloadTypeId" />
      </Principal>
      <Dependent Role="Workloads">
        <PropertyRef Name="WorkloadTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadsAudit_CustomerLogins">
    <End Role="CustomerLogins" Type="Self.CustomerLogins" Multiplicity="1" />
    <End Role="WorkloadsAudit" Type="Self.WorkloadsAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="CustomerLogins">
        <PropertyRef Name="CustomerLoginId" />
      </Principal>
      <Dependent Role="WorkloadsAudit">
        <PropertyRef Name="CustomerLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadsAudit_Customers">
    <End Role="Customers" Type="Self.Customers" Multiplicity="1" />
    <End Role="WorkloadsAudit" Type="Self.WorkloadsAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Customers">
        <PropertyRef Name="CustomerId" />
      </Principal>
      <Dependent Role="WorkloadsAudit">
        <PropertyRef Name="CustomerId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadsAudit_OperatorLogins">
    <End Role="OperatorLogins" Type="Self.OperatorLogins" Multiplicity="1" />
    <End Role="WorkloadsAudit" Type="Self.WorkloadsAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="WorkloadsAudit">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadsAudit_WorkloadStatus">
    <End Role="WorkloadStatus" Type="Self.WorkloadStatus" Multiplicity="1" />
    <End Role="WorkloadsAudit" Type="Self.WorkloadsAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="WorkloadStatus">
        <PropertyRef Name="WorkloadStatusId" />
      </Principal>
      <Dependent Role="WorkloadsAudit">
        <PropertyRef Name="WorkloadStatusId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadsAudit_WorkloadTypes">
    <End Role="WorkloadTypes" Type="Self.WorkloadTypes" Multiplicity="1" />
    <End Role="WorkloadsAudit" Type="Self.WorkloadsAudit" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="WorkloadTypes">
        <PropertyRef Name="WorkloadTypeId" />
      </Principal>
      <Dependent Role="WorkloadsAudit">
        <PropertyRef Name="WorkloadTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Function Name="AcceptCustomerBag" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="CustomerId" Type="int" Mode="In" />
    <Parameter Name="UniqueReference" Type="nvarchar" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <Function Name="CheckCustomerInventoryItemCost" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="itemType" Type="varchar" Mode="In" />
    <Parameter Name="itemTypeCategory" Type="varchar" Mode="In" />
    <Parameter Name="workloadid" Type="int" Mode="In" />
  </Function>
  <Function Name="CheckCustomerInventoryItemSizeCost" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="itemTypeId" Type="int" Mode="In" />
    <Parameter Name="workloadid" Type="int" Mode="In" />
  </Function>
  <Function Name="CreateDeliveryOperator" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="DeliveryId" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
    <Parameter Name="DeviceName" Type="varchar" Mode="In" />
    <Parameter Name="PosPrinter" Type="varchar" Mode="In" />
  </Function>
  <Function Name="CreateDispatch" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Packages" Type="nvarchar(max)" Mode="In" />
    <Parameter Name="BagSeal" Type="nvarchar" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <Function Name="CreatePackage" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="InvoiceItemId" Type="int" Mode="In" />
    <Parameter Name="ItemCount" Type="int" Mode="In" />
    <Parameter Name="ItemCountStain" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <Function Name="CreateWorkload" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="CustomerLoginId" Type="int" Mode="In" />
    <Parameter Name="WorkloadTypeId" Type="int" Mode="In" />
    <Parameter Name="WorkloadItems" Type="nvarchar(max)" Mode="In" />
    <Parameter Name="Reference" Type="nvarchar" Mode="In" />
    <Parameter Name="TotalBags" Type="int" Mode="In" />
  </Function>
  <Function Name="FinishCounting" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="WorkloadId" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <Function Name="fn_diagramobjects" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" ReturnType="int" />
  <Function Name="fnCustomersWithoutPastelCodes" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" ReturnType="int" />
  <Function Name="GenerateInvoiceFromWorkloadCounts" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="WorkloadId" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetCustomerCCEmail" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="workloadId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetCustomerEmail" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="workloadId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetCustomerInventory" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="CustomerId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetCustomerInventoryByCustomerIdWorkloadId" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="CustomerId" Type="int" Mode="In" />
    <Parameter Name="WorkloadId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetCustomerInventoryForWorkload" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="CustomerId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetCustomerInvoiceById" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="CustomerId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetCustomerLoginFromGuid" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Guid" Type="nvarchar" Mode="In" />
  </Function>
  <Function Name="GetCustomerPricingPercentages" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
  <Function Name="GetDeliveryNoteCategoriesByBagSeal" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="BagIds" Type="varchar(max)" Mode="In" />
  </Function>
  <Function Name="GetDispatchesReadyToExport" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="startDate" Type="varchar" Mode="In" />
    <Parameter Name="endDate" Type="varchar" Mode="In" />
  </Function>
  <Function Name="GetDispatchesReadyToPrint" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Customerid" Type="int" Mode="In" />
  </Function>
  <Function Name="GetDuplicatePrelists" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="startDate" Type="varchar" Mode="In" />
    <Parameter Name="endDate" Type="varchar" Mode="In" />
  </Function>
  <Function Name="GetInvoiceForPrinter" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="InvoiceId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetWorkloadInventory" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="WorkloadId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetWorkloadInventoryForDispatch" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="DispatchId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetWorkloadInventoryForDispatches" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="DeliveryId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetWorkloadInventoryForInvoice" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="InvoiceId" Type="int" Mode="In" />
  </Function>
  <Function Name="GetWorkloadInventoryForInvoice_backup_20140820" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="InvoiceId" Type="int" Mode="In" />
  </Function>
  <Function Name="LoginCustomer" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="EmailAddress" Type="nvarchar" Mode="In" />
    <Parameter Name="Password" Type="nvarchar" Mode="In" />
    <Parameter Name="IPAddress" Type="nvarchar" Mode="In" />
  </Function>
  <Function Name="LoginOperator" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Username" Type="nvarchar" Mode="In" />
    <Parameter Name="Password" Type="nvarchar" Mode="In" />
  </Function>
  <Function Name="PLSendMail" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="server" Type="nvarchar" Mode="In" />
    <Parameter Name="from" Type="nvarchar" Mode="In" />
    <Parameter Name="recipients" Type="nvarchar" Mode="In" />
    <Parameter Name="subject" Type="nvarchar" Mode="In" />
    <Parameter Name="body" Type="nvarchar" Mode="In" />
  </Function>
  <Function Name="rptBagReconDeliveries" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="p_CustomerID" Type="int" Mode="In" />
    <Parameter Name="p_StartDate" Type="varchar" Mode="In" />
    <Parameter Name="p_EndDate" Type="varchar" Mode="In" />
  </Function>
  <Function Name="rptBagReconPickups" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="p_CustomerID" Type="int" Mode="In" />
    <Parameter Name="p_StartDate" Type="varchar" Mode="In" />
    <Parameter Name="p_EndDate" Type="varchar" Mode="In" />
  </Function>
  <Function Name="rptOutstandingOrders" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="p_CustomerID" Type="int" Mode="In" />
  </Function>
  <Function Name="rptOutstandingOrders_Items" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="p_CustomerID" Type="int" Mode="In" />
    <Parameter Name="p_StartDate" Type="varchar" Mode="In" />
    <Parameter Name="p_EndDate" Type="varchar" Mode="In" />
  </Function>
  <Function Name="SaveFingerprint" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
    <Parameter Name="Fingerprint" Type="varbinary(max)" Mode="In" />
  </Function>
  <Function Name="sp_alterdiagram" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="diagramname" Type="nvarchar" Mode="In" />
    <Parameter Name="owner_id" Type="int" Mode="In" />
    <Parameter Name="version" Type="int" Mode="In" />
    <Parameter Name="definition" Type="varbinary(max)" Mode="In" />
  </Function>
  <Function Name="sp_creatediagram" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="diagramname" Type="nvarchar" Mode="In" />
    <Parameter Name="owner_id" Type="int" Mode="In" />
    <Parameter Name="version" Type="int" Mode="In" />
    <Parameter Name="definition" Type="varbinary(max)" Mode="In" />
  </Function>
  <Function Name="sp_dropdiagram" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="diagramname" Type="nvarchar" Mode="In" />
    <Parameter Name="owner_id" Type="int" Mode="In" />
  </Function>
  <Function Name="sp_helpdiagramdefinition" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="diagramname" Type="nvarchar" Mode="In" />
    <Parameter Name="owner_id" Type="int" Mode="In" />
  </Function>
  <Function Name="sp_helpdiagrams" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="diagramname" Type="nvarchar" Mode="In" />
    <Parameter Name="owner_id" Type="int" Mode="In" />
  </Function>
  <Function Name="sp_renamediagram" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="diagramname" Type="nvarchar" Mode="In" />
    <Parameter Name="owner_id" Type="int" Mode="In" />
    <Parameter Name="new_diagramname" Type="nvarchar" Mode="In" />
  </Function>
  <Function Name="sp_upgraddiagrams" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
  <Function Name="Split" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="true" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="S" Type="nvarchar(max)" Mode="In" />
    <Parameter Name="Delimiter" Type="char" Mode="In" />
    <ReturnType>
      <CollectionType>
        <RowType>
          <Property Name="s" Type="nvarchar(max)" />
        </RowType>
      </CollectionType>
    </ReturnType>
  </Function>
  <Function Name="UpdateCondemnedPrintedForDelivery" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="DeliveryId" Type="int" Mode="In" />
    <Parameter Name="DispatchId" Type="varchar(max)" Mode="In" />
  </Function>
  <Function Name="UpdateCondemnedPrintedForDispatches" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="DispatchId" Type="varchar(max)" Mode="In" />
  </Function>
  <Function Name="UpdateCustomerInventory" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="CustomerId" Type="int" Mode="In" />
    <Parameter Name="InventoryItemTypeId" Type="int" Mode="In" />
    <Parameter Name="CostGeneralWash" Type="int" Mode="In" />
    <Parameter Name="CostRepeatWash" Type="int" Mode="In" />
    <Parameter Name="CostStainWash" Type="int" Mode="In" />
    <Parameter Name="CostRewashWash" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <Function Name="UpdateCustomerInventoryByPercentages" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <Function Name="UpdateCustomerLogin" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="CustomerId" Type="int" Mode="In" />
    <Parameter Name="EmailAddress" Type="nvarchar" Mode="In" />
    <Parameter Name="Password" Type="nvarchar" Mode="In" />
    <Parameter Name="IsActive" Type="bit" Mode="In" />
    <Parameter Name="IsLockedOut" Type="bit" Mode="In" />
  </Function>
  <Function Name="UpdateCustomerWorkloadBag" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="CustomerLoginId" Type="int" Mode="In" />
    <Parameter Name="WorkloadId" Type="int" Mode="In" />
    <Parameter Name="UniqueReference" Type="nvarchar" Mode="In" />
  </Function>
  <Function Name="UpdateDispatchDelivery" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="DispatchIds" Type="nvarchar(max)" Mode="In" />
  </Function>
  <Function Name="UpdateInventoryItemType" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Category" Type="nvarchar" Mode="In" />
    <Parameter Name="ItemType" Type="nvarchar" Mode="In" />
    <Parameter Name="Size" Type="nvarchar" Mode="In" />
    <Parameter Name="InventoryItemTypeId" Type="int" Mode="In" />
  </Function>
  <Function Name="UpdateInvoiceItemBadCount" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="InvoiceId" Type="int" Mode="In" />
    <Parameter Name="InventoryItemTypeId" Type="int" Mode="In" />
    <Parameter Name="Count" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <Function Name="UpdateInvoiceItemCount" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="InvoiceId" Type="int" Mode="In" />
    <Parameter Name="InventoryItemTypeId" Type="int" Mode="In" />
    <Parameter Name="Count" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <Function Name="UpdateOperatorLogin" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="Username" Type="nvarchar" Mode="In" />
    <Parameter Name="Password" Type="nvarchar" Mode="In" />
    <Parameter Name="OperatorRoleId" Type="int" Mode="In" />
    <Parameter Name="OperatorShift" Type="nvarchar" Mode="In" />
  </Function>
  <Function Name="UpdateWorkloadItem" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="WorkloadId" Type="int" Mode="In" />
    <Parameter Name="CustomerInventoryId" Type="int" Mode="In" />
    <Parameter Name="ItemCount" Type="int" Mode="In" />
    <Parameter Name="CustomerLoginId" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
  <EntityContainer Name="PersonalLaundryModelStoreContainer">
    <EntitySet Name="Actions" EntityType="Self.Actions" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BagReferences" EntityType="Self.BagReferences" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="BillingProfiles" EntityType="Self.BillingProfiles" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CustomerInventory" EntityType="Self.CustomerInventory" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CustomerInventoryAudit" EntityType="Self.CustomerInventoryAudit" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CustomerLoginLog" EntityType="Self.CustomerLoginLog" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CustomerLogins" EntityType="Self.CustomerLogins" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Customers" EntityType="Self.Customers" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="CustomerWorkloadBags" EntityType="Self.CustomerWorkloadBags" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Dispatches" EntityType="Self.Dispatches" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="DispatchPackages" EntityType="Self.DispatchPackages" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="DispatchStatus" EntityType="Self.DispatchStatus" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="DriverActions" EntityType="Self.DriverActions" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="DriverLog" EntityType="Self.DriverLog" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="InventoryItems" EntityType="Self.InventoryItems" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="InventoryItemTypeCategories" EntityType="Self.InventoryItemTypeCategories" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="InventoryItemTypes" EntityType="Self.InventoryItemTypes" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="InventoryItemTypeSize" EntityType="Self.InventoryItemTypeSize" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="InvoiceBags" EntityType="Self.InvoiceBags" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="InvoiceItems" EntityType="Self.InvoiceItems" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Invoices" EntityType="Self.Invoices" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="InvoiceStatus" EntityType="Self.InvoiceStatus" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Locations" EntityType="Self.Locations" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="OperatorLogins" EntityType="Self.OperatorLogins" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="OperatorRoles" EntityType="Self.OperatorRoles" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Packages" EntityType="Self.Packages" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Settings" EntityType="Self.Settings" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="WorkloadItems" EntityType="Self.WorkloadItems" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="WorkloadItemsAudit" EntityType="Self.WorkloadItemsAudit" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Workloads" EntityType="Self.Workloads" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="WorkloadsAudit" EntityType="Self.WorkloadsAudit" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="WorkloadStatus" EntityType="Self.WorkloadStatus" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="WorkloadTypes" EntityType="Self.WorkloadTypes" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="DispatchOperator" EntityType="Self.DispatchOperator" store:Type="Tables" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [DispatchOperator].[DeliveryId] AS [DeliveryId], 
    [DispatchOperator].[OperatorLoginId] AS [OperatorLoginId], 
    [DispatchOperator].[DeviceName] AS [DeviceName], 
    [DispatchOperator].[PosPrinter] AS [PosPrinter], 
    [DispatchOperator].[LastEdit] AS [LastEdit]
    FROM [dbo].[DispatchOperator] AS [DispatchOperator]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="VAT" EntityType="Self.VAT" store:Type="Tables" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [VAT].[VAT] AS [VAT]
    FROM [dbo].[VAT] AS [VAT]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwClosedCustomerWorkloads" EntityType="Self.vwClosedCustomerWorkloads" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwClosedCustomerWorkloads].[WorkloadItemId] AS [WorkloadItemId], 
    [vwClosedCustomerWorkloads].[WorkloadId] AS [WorkloadId], 
    [vwClosedCustomerWorkloads].[CustomerInventoryId] AS [CustomerInventoryId], 
    [vwClosedCustomerWorkloads].[ItemCount] AS [ItemCount], 
    [vwClosedCustomerWorkloads].[CustomerLoginId] AS [CustomerLoginId], 
    [vwClosedCustomerWorkloads].[OperatorLoginId] AS [OperatorLoginId], 
    [vwClosedCustomerWorkloads].[TimeStamp] AS [TimeStamp]
    FROM [dbo].[vwClosedCustomerWorkloads] AS [vwClosedCustomerWorkloads]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwCustomerBagsReadyToDispatch" EntityType="Self.vwCustomerBagsReadyToDispatch" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwCustomerBagsReadyToDispatch].[CustomerId] AS [CustomerId], 
    [vwCustomerBagsReadyToDispatch].[DispatchId] AS [DispatchId], 
    [vwCustomerBagsReadyToDispatch].[BagSeal] AS [BagSeal], 
    [vwCustomerBagsReadyToDispatch].[DispatchPackagesCount] AS [DispatchPackagesCount], 
    [vwCustomerBagsReadyToDispatch].[Name] AS [Name], 
    [vwCustomerBagsReadyToDispatch].[WorkloadId] AS [WorkloadId]
    FROM [dbo].[vwCustomerBagsReadyToDispatch] AS [vwCustomerBagsReadyToDispatch]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwCustomerBagsWaitingCounting" EntityType="Self.vwCustomerBagsWaitingCounting" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwCustomerBagsWaitingCounting].[CustomerId] AS [CustomerId], 
    [vwCustomerBagsWaitingCounting].[Name] AS [Name], 
    [vwCustomerBagsWaitingCounting].[BagCount] AS [BagCount]
    FROM [dbo].[vwCustomerBagsWaitingCounting] AS [vwCustomerBagsWaitingCounting]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwCustomerInventory" EntityType="Self.vwCustomerInventory" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwCustomerInventory].[CustomerId] AS [CustomerId], 
    [vwCustomerInventory].[CustomerInventoryId] AS [CustomerInventoryId], 
    [vwCustomerInventory].[Category] AS [Category], 
    [vwCustomerInventory].[ItemType] AS [ItemType], 
    [vwCustomerInventory].[Size] AS [Size], 
    [vwCustomerInventory].[TCOrderPriority] AS [TCOrderPriority], 
    [vwCustomerInventory].[TSOrderPriority] AS [TSOrderPriority]
    FROM [dbo].[vwCustomerInventory] AS [vwCustomerInventory]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwCustomerInventoryForWorkload" EntityType="Self.vwCustomerInventoryForWorkload" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwCustomerInventoryForWorkload].[CustomerId] AS [CustomerId], 
    [vwCustomerInventoryForWorkload].[CustomerInventoryId] AS [CustomerInventoryId], 
    [vwCustomerInventoryForWorkload].[Category] AS [Category], 
    [vwCustomerInventoryForWorkload].[ItemType] AS [ItemType], 
    [vwCustomerInventoryForWorkload].[Size] AS [Size], 
    [vwCustomerInventoryForWorkload].[TCOrderPriority] AS [TCOrderPriority], 
    [vwCustomerInventoryForWorkload].[TSOrderPriority] AS [TSOrderPriority]
    FROM [dbo].[vwCustomerInventoryForWorkload] AS [vwCustomerInventoryForWorkload]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwCustomerInventoryWorkload" EntityType="Self.vwCustomerInventoryWorkload" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwCustomerInventoryWorkload].[WorkloadId] AS [WorkloadId], 
    [vwCustomerInventoryWorkload].[InventoryItemTypeId] AS [InventoryItemTypeId], 
    [vwCustomerInventoryWorkload].[CostGeneralWash] AS [CostGeneralWash], 
    [vwCustomerInventoryWorkload].[CostRepeatWash] AS [CostRepeatWash], 
    [vwCustomerInventoryWorkload].[CostStainWash] AS [CostStainWash], 
    [vwCustomerInventoryWorkload].[ItemCount] AS [ItemCount]
    FROM [dbo].[vwCustomerInventoryWorkload] AS [vwCustomerInventoryWorkload]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwDeliveryNoteCategoriesByBagSeal" EntityType="Self.vwDeliveryNoteCategoriesByBagSeal" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwDeliveryNoteCategoriesByBagSeal].[DispatchId] AS [DispatchId], 
    [vwDeliveryNoteCategoriesByBagSeal].[InvoiceId] AS [InvoiceId], 
    [vwDeliveryNoteCategoriesByBagSeal].[BagSeal] AS [BagSeal], 
    [vwDeliveryNoteCategoriesByBagSeal].[Categories] AS [Categories]
    FROM [dbo].[vwDeliveryNoteCategoriesByBagSeal] AS [vwDeliveryNoteCategoriesByBagSeal]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwDeliveryNoteCategoriesByBagSeal2" EntityType="Self.vwDeliveryNoteCategoriesByBagSeal2" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwDeliveryNoteCategoriesByBagSeal2].[DispatchId] AS [DispatchId], 
    [vwDeliveryNoteCategoriesByBagSeal2].[InvoiceId] AS [InvoiceId], 
    [vwDeliveryNoteCategoriesByBagSeal2].[BagSeal] AS [BagSeal], 
    [vwDeliveryNoteCategoriesByBagSeal2].[Categories] AS [Categories], 
    [vwDeliveryNoteCategoriesByBagSeal2].[WorkloadId] AS [WorkloadId], 
    [vwDeliveryNoteCategoriesByBagSeal2].[DeliveryId] AS [DeliveryId]
    FROM [dbo].[vwDeliveryNoteCategoriesByBagSeal2] AS [vwDeliveryNoteCategoriesByBagSeal2]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwDispatchBagPackageContents" EntityType="Self.vwDispatchBagPackageContents" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwDispatchBagPackageContents].[DispatchId] AS [DispatchId], 
    [vwDispatchBagPackageContents].[PackageId] AS [PackageId], 
    [vwDispatchBagPackageContents].[BagNumber] AS [BagNumber], 
    [vwDispatchBagPackageContents].[ItemType] AS [ItemType], 
    [vwDispatchBagPackageContents].[Category] AS [Category], 
    [vwDispatchBagPackageContents].[Category_OrderPriority] AS [Category_OrderPriority], 
    [vwDispatchBagPackageContents].[Size] AS [Size], 
    [vwDispatchBagPackageContents].[Size_OrderPriority] AS [Size_OrderPriority], 
    [vwDispatchBagPackageContents].[ItemCount] AS [ItemCount], 
    [vwDispatchBagPackageContents].[ItemCountStain] AS [ItemCountStain]
    FROM [dbo].[vwDispatchBagPackageContents] AS [vwDispatchBagPackageContents]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwDispatchesOutForDelivery" EntityType="Self.vwDispatchesOutForDelivery" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwDispatchesOutForDelivery].[InvoiceId] AS [InvoiceId]
    FROM [dbo].[vwDispatchesOutForDelivery] AS [vwDispatchesOutForDelivery]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwDispatchesReadyToPrint" EntityType="Self.vwDispatchesReadyToPrint" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwDispatchesReadyToPrint].[DeliveryId] AS [DeliveryId], 
    [vwDispatchesReadyToPrint].[CustomerId] AS [CustomerId], 
    [vwDispatchesReadyToPrint].[WorkloadId] AS [WorkloadId], 
    [vwDispatchesReadyToPrint].[DateCreated] AS [DateCreated], 
    [vwDispatchesReadyToPrint].[DateDelivered] AS [DateDelivered], 
    [vwDispatchesReadyToPrint].[Dispatch] AS [Dispatch]
    FROM [dbo].[vwDispatchesReadyToPrint] AS [vwDispatchesReadyToPrint]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwExcelDataDump" EntityType="Self.vwExcelDataDump" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwExcelDataDump].[Date] AS [Date], 
    [vwExcelDataDump].[Name] AS [Name], 
    [vwExcelDataDump].[Type] AS [Type], 
    [vwExcelDataDump].[ItemType] AS [ItemType], 
    [vwExcelDataDump].[Size] AS [Size], 
    [vwExcelDataDump].[ItemCount] AS [ItemCount]
    FROM [dbo].[vwExcelDataDump] AS [vwExcelDataDump]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwInventoryItems" EntityType="Self.vwInventoryItems" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwInventoryItems].[InventoryItemTypeId] AS [InventoryItemTypeId], 
    [vwInventoryItems].[ItemType] AS [ItemType], 
    [vwInventoryItems].[Category] AS [Category], 
    [vwInventoryItems].[Size] AS [Size], 
    [vwInventoryItems].[Categories_OrderPriority] AS [Categories_OrderPriority], 
    [vwInventoryItems].[Size_OrderPriority] AS [Size_OrderPriority]
    FROM [dbo].[vwInventoryItems] AS [vwInventoryItems]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwInventoryItemTypes" EntityType="Self.vwInventoryItemTypes" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwInventoryItemTypes].[Category] AS [Category], 
    [vwInventoryItemTypes].[ItemType] AS [ItemType]
    FROM [dbo].[vwInventoryItemTypes] AS [vwInventoryItemTypes]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwInvoiceBagSealCategories" EntityType="Self.vwInvoiceBagSealCategories" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwInvoiceBagSealCategories].[DispatchId] AS [DispatchId], 
    [vwInvoiceBagSealCategories].[InvoiceId] AS [InvoiceId], 
    [vwInvoiceBagSealCategories].[BagSeal] AS [BagSeal], 
    [vwInvoiceBagSealCategories].[Category] AS [Category], 
    [vwInvoiceBagSealCategories].[DeliveryId] AS [DeliveryId]
    FROM [dbo].[vwInvoiceBagSealCategories] AS [vwInvoiceBagSealCategories]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwInvoiceCountsCondemned" EntityType="Self.vwInvoiceCountsCondemned" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwInvoiceCountsCondemned].[InvoiceId] AS [InvoiceId], 
    [vwInvoiceCountsCondemned].[WorkloadId] AS [WorkloadId], 
    [vwInvoiceCountsCondemned].[InventoryItemTypeId] AS [InventoryItemTypeId], 
    [vwInvoiceCountsCondemned].[ItemType] AS [ItemType], 
    [vwInvoiceCountsCondemned].[Category] AS [Category], 
    [vwInvoiceCountsCondemned].[Size] AS [Size], 
    [vwInvoiceCountsCondemned].[InvoiceBadCount] AS [InvoiceBadCount], 
    [vwInvoiceCountsCondemned].[CustomerItemCount] AS [CustomerItemCount], 
    [vwInvoiceCountsCondemned].[Cost] AS [Cost], 
    [vwInvoiceCountsCondemned].[CostGeneralWash] AS [CostGeneralWash], 
    [vwInvoiceCountsCondemned].[CostRepeatWash] AS [CostRepeatWash], 
    [vwInvoiceCountsCondemned].[CostStainWash] AS [CostStainWash], 
    [vwInvoiceCountsCondemned].[Categories_OrderPriority] AS [Categories_OrderPriority], 
    [vwInvoiceCountsCondemned].[Size_OrderPriority] AS [Size_OrderPriority]
    FROM [dbo].[vwInvoiceCountsCondemned] AS [vwInvoiceCountsCondemned]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwInvoiceCountsRecon" EntityType="Self.vwInvoiceCountsRecon" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwInvoiceCountsRecon].[InvoiceId] AS [InvoiceId], 
    [vwInvoiceCountsRecon].[WorkloadId] AS [WorkloadId], 
    [vwInvoiceCountsRecon].[InventoryItemTypeId] AS [InventoryItemTypeId], 
    [vwInvoiceCountsRecon].[ItemType] AS [ItemType], 
    [vwInvoiceCountsRecon].[Category] AS [Category], 
    [vwInvoiceCountsRecon].[Size] AS [Size], 
    [vwInvoiceCountsRecon].[InvoiceItemCount] AS [InvoiceItemCount], 
    [vwInvoiceCountsRecon].[CustomerItemCount] AS [CustomerItemCount], 
    [vwInvoiceCountsRecon].[Cost] AS [Cost], 
    [vwInvoiceCountsRecon].[CostGeneralWash] AS [CostGeneralWash], 
    [vwInvoiceCountsRecon].[CostRepeatWash] AS [CostRepeatWash], 
    [vwInvoiceCountsRecon].[CostStainWash] AS [CostStainWash], 
    [vwInvoiceCountsRecon].[Categories_OrderPriority] AS [Categories_OrderPriority], 
    [vwInvoiceCountsRecon].[Size_OrderPriority] AS [Size_OrderPriority]
    FROM [dbo].[vwInvoiceCountsRecon] AS [vwInvoiceCountsRecon]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwInvoiceItemCounts" EntityType="Self.vwInvoiceItemCounts" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwInvoiceItemCounts].[InvoiceId] AS [InvoiceId], 
    [vwInvoiceItemCounts].[Name] AS [Name], 
    [vwInvoiceItemCounts].[WorkloadId] AS [WorkloadId], 
    [vwInvoiceItemCounts].[DateCreated] AS [DateCreated], 
    [vwInvoiceItemCounts].[ItemCount] AS [ItemCount]
    FROM [dbo].[vwInvoiceItemCounts] AS [vwInvoiceItemCounts]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwInvoicesReadyToPrint" EntityType="Self.vwInvoicesReadyToPrint" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwInvoicesReadyToPrint].[Id] AS [Id], 
    [vwInvoicesReadyToPrint].[CustomerId] AS [CustomerId], 
    [vwInvoicesReadyToPrint].[WorkloadId] AS [WorkloadId], 
    [vwInvoicesReadyToPrint].[DateCreated] AS [DateCreated], 
    [vwInvoicesReadyToPrint].[OperatorLoginId] AS [OperatorLoginId], 
    [vwInvoicesReadyToPrint].[InvoiceStatusId] AS [InvoiceStatusId], 
    [vwInvoicesReadyToPrint].[InvoiceType] AS [InvoiceType], 
    [vwInvoicesReadyToPrint].[InvoiceId] AS [InvoiceId]
    FROM [dbo].[vwInvoicesReadyToPrint] AS [vwInvoicesReadyToPrint]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwInvoicesReadyToPrint2" EntityType="Self.vwInvoicesReadyToPrint2" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwInvoicesReadyToPrint2].[Id] AS [Id], 
    [vwInvoicesReadyToPrint2].[CustomerId] AS [CustomerId], 
    [vwInvoicesReadyToPrint2].[WorkloadId] AS [WorkloadId], 
    [vwInvoicesReadyToPrint2].[DateCreated] AS [DateCreated], 
    [vwInvoicesReadyToPrint2].[OperatorLoginId] AS [OperatorLoginId], 
    [vwInvoicesReadyToPrint2].[InvoiceStatusId] AS [InvoiceStatusId], 
    [vwInvoicesReadyToPrint2].[InvoiceType] AS [InvoiceType], 
    [vwInvoicesReadyToPrint2].[InvoiceId] AS [InvoiceId], 
    [vwInvoicesReadyToPrint2].[Invoice] AS [Invoice], 
    [vwInvoicesReadyToPrint2].[Printed] AS [Printed]
    FROM [dbo].[vwInvoicesReadyToPrint2] AS [vwInvoicesReadyToPrint2]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwOpenCustomerWorkloads" EntityType="Self.vwOpenCustomerWorkloads" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwOpenCustomerWorkloads].[WorkloadItemId] AS [WorkloadItemId], 
    [vwOpenCustomerWorkloads].[WorkloadId] AS [WorkloadId], 
    [vwOpenCustomerWorkloads].[CustomerInventoryId] AS [CustomerInventoryId], 
    [vwOpenCustomerWorkloads].[ItemCount] AS [ItemCount], 
    [vwOpenCustomerWorkloads].[CustomerLoginId] AS [CustomerLoginId], 
    [vwOpenCustomerWorkloads].[OperatorLoginId] AS [OperatorLoginId], 
    [vwOpenCustomerWorkloads].[TimeStamp] AS [TimeStamp]
    FROM [dbo].[vwOpenCustomerWorkloads] AS [vwOpenCustomerWorkloads]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwPackageContents" EntityType="Self.vwPackageContents" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwPackageContents].[PackageId] AS [PackageId], 
    [vwPackageContents].[InvoiceId] AS [InvoiceId], 
    [vwPackageContents].[WorkloadId] AS [WorkloadId], 
    [vwPackageContents].[Description] AS [Description]
    FROM [dbo].[vwPackageContents] AS [vwPackageContents]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwPackagesReadyForDispatch" EntityType="Self.vwPackagesReadyForDispatch" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwPackagesReadyForDispatch].[PackageId] AS [PackageId], 
    [vwPackagesReadyForDispatch].[InvoiceItemId] AS [InvoiceItemId], 
    [vwPackagesReadyForDispatch].[ItemCount] AS [ItemCount], 
    [vwPackagesReadyForDispatch].[OperatorLoginId] AS [OperatorLoginId], 
    [vwPackagesReadyForDispatch].[DateCreated] AS [DateCreated]
    FROM [dbo].[vwPackagesReadyForDispatch] AS [vwPackagesReadyForDispatch]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwWorkloadCategoryTypeCounts" EntityType="Self.vwWorkloadCategoryTypeCounts" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwWorkloadCategoryTypeCounts].[WorkloadId] AS [WorkloadId], 
    [vwWorkloadCategoryTypeCounts].[Category] AS [Category], 
    [vwWorkloadCategoryTypeCounts].[ItemType] AS [ItemType], 
    [vwWorkloadCategoryTypeCounts].[ItemCount] AS [ItemCount]
    FROM [dbo].[vwWorkloadCategoryTypeCounts] AS [vwWorkloadCategoryTypeCounts]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwWorkloadStatusReport" EntityType="Self.vwWorkloadStatusReport" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwWorkloadStatusReport].[WorkloadStatusId] AS [WorkloadStatusId], 
    [vwWorkloadStatusReport].[Status] AS [Status], 
    [vwWorkloadStatusReport].[Customers] AS [Customers], 
    [vwWorkloadStatusReport].[TotalItems] AS [TotalItems]
    FROM [dbo].[vwWorkloadStatusReport] AS [vwWorkloadStatusReport]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwWorkloadStatusReportWithCounts" EntityType="Self.vwWorkloadStatusReportWithCounts" store:Type="Views" store:Schema="dbo">
      <DefiningQuery>SELECT 
    [vwWorkloadStatusReportWithCounts].[WorkloadStatusId] AS [WorkloadStatusId], 
    [vwWorkloadStatusReportWithCounts].[Status] AS [Status], 
    [vwWorkloadStatusReportWithCounts].[Customers] AS [Customers], 
    [vwWorkloadStatusReportWithCounts].[Bags] AS [Bags], 
    [vwWorkloadStatusReportWithCounts].[Items] AS [Items]
    FROM [dbo].[vwWorkloadStatusReportWithCounts] AS [vwWorkloadStatusReportWithCounts]</DefiningQuery>
    </EntitySet>
    <AssociationSet Name="FK_BagReferences_OperatorLogins" Association="Self.FK_BagReferences_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="BagReferences" EntitySet="BagReferences" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerInventory_Customer" Association="Self.FK_CustomerInventory_Customer">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="CustomerInventory" EntitySet="CustomerInventory" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerInventory_InventoryItemTypes" Association="Self.FK_CustomerInventory_InventoryItemTypes">
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
      <End Role="CustomerInventory" EntitySet="CustomerInventory" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerInventory_OperatorLogins" Association="Self.FK_CustomerInventory_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="CustomerInventory" EntitySet="CustomerInventory" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerInventoryAudit_Customers" Association="Self.FK_CustomerInventoryAudit_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="CustomerInventoryAudit" EntitySet="CustomerInventoryAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerInventoryAudit_InventoryItems" Association="Self.FK_CustomerInventoryAudit_InventoryItems">
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
      <End Role="CustomerInventoryAudit" EntitySet="CustomerInventoryAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerInventoryAudit_OperatorLogins" Association="Self.FK_CustomerInventoryAudit_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="CustomerInventoryAudit" EntitySet="CustomerInventoryAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerLoginLog_Actions" Association="Self.FK_CustomerLoginLog_Actions">
      <End Role="Actions" EntitySet="Actions" />
      <End Role="CustomerLoginLog" EntitySet="CustomerLoginLog" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerLogins_Customers" Association="Self.FK_CustomerLogins_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
    </AssociationSet>
    <AssociationSet Name="FK_Customers_BillingProfiles" Association="Self.FK_Customers_BillingProfiles">
      <End Role="BillingProfiles" EntitySet="BillingProfiles" />
      <End Role="Customers" EntitySet="Customers" />
    </AssociationSet>
    <AssociationSet Name="FK_Customers_OperatorLogins" Association="Self.FK_Customers_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="Customers" EntitySet="Customers" />
    </AssociationSet>
    <AssociationSet Name="FK_Dispatches_DispatchStatus" Association="Self.FK_Dispatches_DispatchStatus">
      <End Role="DispatchStatus" EntitySet="DispatchStatus" />
      <End Role="Dispatches" EntitySet="Dispatches" />
    </AssociationSet>
    <AssociationSet Name="FK_Dispatches_Invoices" Association="Self.FK_Dispatches_Invoices">
      <End Role="Invoices" EntitySet="Invoices" />
      <End Role="Dispatches" EntitySet="Dispatches" />
    </AssociationSet>
    <AssociationSet Name="FK_Dispatches_OperatorLogins" Association="Self.FK_Dispatches_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="Dispatches" EntitySet="Dispatches" />
    </AssociationSet>
    <AssociationSet Name="FK_DispatchItems_Dispatches" Association="Self.FK_DispatchItems_Dispatches">
      <End Role="Dispatches" EntitySet="Dispatches" />
      <End Role="DispatchPackages" EntitySet="DispatchPackages" />
    </AssociationSet>
    <AssociationSet Name="FK_DispatchItems_Packages" Association="Self.FK_DispatchItems_Packages">
      <End Role="Packages" EntitySet="Packages" />
      <End Role="DispatchPackages" EntitySet="DispatchPackages" />
    </AssociationSet>
    <AssociationSet Name="FK_DriverLog_Customers" Association="Self.FK_DriverLog_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="DriverLog" EntitySet="DriverLog" />
    </AssociationSet>
    <AssociationSet Name="FK_DriverLog_DriverActions" Association="Self.FK_DriverLog_DriverActions">
      <End Role="DriverActions" EntitySet="DriverActions" />
      <End Role="DriverLog" EntitySet="DriverLog" />
    </AssociationSet>
    <AssociationSet Name="FK_DriverLog_Locations" Association="Self.FK_DriverLog_Locations">
      <End Role="Locations" EntitySet="Locations" />
      <End Role="DriverLog" EntitySet="DriverLog" />
    </AssociationSet>
    <AssociationSet Name="FK_DriverLog_OperatorLogins" Association="Self.FK_DriverLog_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="DriverLog" EntitySet="DriverLog" />
    </AssociationSet>
    <AssociationSet Name="FK_InventoryItems_Customers" Association="Self.FK_InventoryItems_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="InventoryItems" EntitySet="InventoryItems" />
    </AssociationSet>
    <AssociationSet Name="FK_InventoryItems_InventoryItemTypes" Association="Self.FK_InventoryItems_InventoryItemTypes">
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
      <End Role="InventoryItems" EntitySet="InventoryItems" />
    </AssociationSet>
    <AssociationSet Name="FK_InventoryItemTypes_InventoryItemTypeCategories" Association="Self.FK_InventoryItemTypes_InventoryItemTypeCategories">
      <End Role="InventoryItemTypeCategories" EntitySet="InventoryItemTypeCategories" />
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
    </AssociationSet>
    <AssociationSet Name="FK_InventoryItemTypes_InventoryItemTypeSize" Association="Self.FK_InventoryItemTypes_InventoryItemTypeSize">
      <End Role="InventoryItemTypeSize" EntitySet="InventoryItemTypeSize" />
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
    </AssociationSet>
    <AssociationSet Name="FK_InvoiceBags_BagReferences" Association="Self.FK_InvoiceBags_BagReferences">
      <End Role="BagReferences" EntitySet="BagReferences" />
      <End Role="InvoiceBags" EntitySet="InvoiceBags" />
    </AssociationSet>
    <AssociationSet Name="FK_InvoiceBags_Invoices" Association="Self.FK_InvoiceBags_Invoices">
      <End Role="Invoices" EntitySet="Invoices" />
      <End Role="InvoiceBags" EntitySet="InvoiceBags" />
    </AssociationSet>
    <AssociationSet Name="FK_InvoiceBags_OperatorLogins" Association="Self.FK_InvoiceBags_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="InvoiceBags" EntitySet="InvoiceBags" />
    </AssociationSet>
    <AssociationSet Name="FK_InvoiceItems_InventoryItemTypes" Association="Self.FK_InvoiceItems_InventoryItemTypes">
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
      <End Role="InvoiceItems" EntitySet="InvoiceItems" />
    </AssociationSet>
    <AssociationSet Name="FK_InvoiceItems_Invoices" Association="Self.FK_InvoiceItems_Invoices">
      <End Role="Invoices" EntitySet="Invoices" />
      <End Role="InvoiceItems" EntitySet="InvoiceItems" />
    </AssociationSet>
    <AssociationSet Name="FK_InvoiceItems_OperatorLogins" Association="Self.FK_InvoiceItems_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="InvoiceItems" EntitySet="InvoiceItems" />
    </AssociationSet>
    <AssociationSet Name="FK_Invoices_Customers" Association="Self.FK_Invoices_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="Invoices" EntitySet="Invoices" />
    </AssociationSet>
    <AssociationSet Name="FK_Invoices_InvoiceStatus" Association="Self.FK_Invoices_InvoiceStatus">
      <End Role="InvoiceStatus" EntitySet="InvoiceStatus" />
      <End Role="Invoices" EntitySet="Invoices" />
    </AssociationSet>
    <AssociationSet Name="FK_Invoices_OperatorLogins" Association="Self.FK_Invoices_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="Invoices" EntitySet="Invoices" />
    </AssociationSet>
    <AssociationSet Name="FK_Invoices_Workloads" Association="Self.FK_Invoices_Workloads">
      <End Role="Workloads" EntitySet="Workloads" />
      <End Role="Invoices" EntitySet="Invoices" />
    </AssociationSet>
    <AssociationSet Name="FK_OperatorLogins_OperatorRoles" Association="Self.FK_OperatorLogins_OperatorRoles">
      <End Role="OperatorRoles" EntitySet="OperatorRoles" />
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
    </AssociationSet>
    <AssociationSet Name="FK_Packages_InvoiceItems" Association="Self.FK_Packages_InvoiceItems">
      <End Role="InvoiceItems" EntitySet="InvoiceItems" />
      <End Role="Packages" EntitySet="Packages" />
    </AssociationSet>
    <AssociationSet Name="FK_Packages_OperatorLogins" Association="Self.FK_Packages_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="Packages" EntitySet="Packages" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadBags_CustomerLogins" Association="Self.FK_WorkloadBags_CustomerLogins">
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
      <End Role="CustomerWorkloadBags" EntitySet="CustomerWorkloadBags" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadBags_Workloads" Association="Self.FK_WorkloadBags_Workloads">
      <End Role="Workloads" EntitySet="Workloads" />
      <End Role="CustomerWorkloadBags" EntitySet="CustomerWorkloadBags" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItems_CustomerInventory" Association="Self.FK_WorkloadItems_CustomerInventory">
      <End Role="CustomerInventory" EntitySet="CustomerInventory" />
      <End Role="WorkloadItems" EntitySet="WorkloadItems" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItems_CustomerLogins" Association="Self.FK_WorkloadItems_CustomerLogins">
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
      <End Role="WorkloadItems" EntitySet="WorkloadItems" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItems_OperatorLogins" Association="Self.FK_WorkloadItems_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="WorkloadItems" EntitySet="WorkloadItems" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItems_Workloads" Association="Self.FK_WorkloadItems_Workloads">
      <End Role="Workloads" EntitySet="Workloads" />
      <End Role="WorkloadItems" EntitySet="WorkloadItems" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItemsAudit_CustomerInventory" Association="Self.FK_WorkloadItemsAudit_CustomerInventory">
      <End Role="CustomerInventory" EntitySet="CustomerInventory" />
      <End Role="WorkloadItemsAudit" EntitySet="WorkloadItemsAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItemsAudit_CustomerLogins" Association="Self.FK_WorkloadItemsAudit_CustomerLogins">
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
      <End Role="WorkloadItemsAudit" EntitySet="WorkloadItemsAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItemsAudit_OperatorLogins" Association="Self.FK_WorkloadItemsAudit_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="WorkloadItemsAudit" EntitySet="WorkloadItemsAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItemsAudit_Workloads" Association="Self.FK_WorkloadItemsAudit_Workloads">
      <End Role="Workloads" EntitySet="Workloads" />
      <End Role="WorkloadItemsAudit" EntitySet="WorkloadItemsAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_CustomerLogins" Association="Self.FK_Workloads_CustomerLogins">
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_Customers" Association="Self.FK_Workloads_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_OperatorLogins" Association="Self.FK_Workloads_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_WorkloadStatus" Association="Self.FK_Workloads_WorkloadStatus">
      <End Role="WorkloadStatus" EntitySet="WorkloadStatus" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_WorkloadTypes" Association="Self.FK_Workloads_WorkloadTypes">
      <End Role="WorkloadTypes" EntitySet="WorkloadTypes" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadsAudit_CustomerLogins" Association="Self.FK_WorkloadsAudit_CustomerLogins">
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
      <End Role="WorkloadsAudit" EntitySet="WorkloadsAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadsAudit_Customers" Association="Self.FK_WorkloadsAudit_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="WorkloadsAudit" EntitySet="WorkloadsAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadsAudit_OperatorLogins" Association="Self.FK_WorkloadsAudit_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="WorkloadsAudit" EntitySet="WorkloadsAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadsAudit_WorkloadStatus" Association="Self.FK_WorkloadsAudit_WorkloadStatus">
      <End Role="WorkloadStatus" EntitySet="WorkloadStatus" />
      <End Role="WorkloadsAudit" EntitySet="WorkloadsAudit" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadsAudit_WorkloadTypes" Association="Self.FK_WorkloadsAudit_WorkloadTypes">
      <End Role="WorkloadTypes" EntitySet="WorkloadTypes" />
      <End Role="WorkloadsAudit" EntitySet="WorkloadsAudit" />
    </AssociationSet>
  </EntityContainer>
</Schema>