﻿<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="PersonalLaundryModel.Store" Alias="Self" Provider="System.Data.SqlClient" ProviderManifestToken="2008" xmlns:store="http://schemas.microsoft.com/ado/2007/12/edm/EntityStoreSchemaGenerator" xmlns="http://schemas.microsoft.com/ado/2009/02/edm/ssdl">
  <EntityContainer Name="PersonalLaundryModelStoreContainer">
    <EntitySet Name="BillingProfiles" EntityType="PersonalLaundryModel.Store.BillingProfiles" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="CustomerInventory" EntityType="PersonalLaundryModel.Store.CustomerInventory" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="CustomerLogins" EntityType="PersonalLaundryModel.Store.CustomerLogins" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Customers" EntityType="PersonalLaundryModel.Store.Customers" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="CustomerWorkloadBags" EntityType="PersonalLaundryModel.Store.CustomerWorkloadBags" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Dispatches" EntityType="PersonalLaundryModel.Store.Dispatches" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="DispatchItems" EntityType="PersonalLaundryModel.Store.DispatchItems" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="DispatchStatus" EntityType="PersonalLaundryModel.Store.DispatchStatus" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="InventoryItems" EntityType="PersonalLaundryModel.Store.InventoryItems" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="InventoryItemTypeCategories" EntityType="PersonalLaundryModel.Store.InventoryItemTypeCategories" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="InventoryItemTypes" EntityType="PersonalLaundryModel.Store.InventoryItemTypes" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="InventoryItemTypeSize" EntityType="PersonalLaundryModel.Store.InventoryItemTypeSize" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="InvoiceItems" EntityType="PersonalLaundryModel.Store.InvoiceItems" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Invoices" EntityType="PersonalLaundryModel.Store.Invoices" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="InvoiceStatus" EntityType="PersonalLaundryModel.Store.InvoiceStatus" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="OperatorLogins" EntityType="PersonalLaundryModel.Store.OperatorLogins" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="OperatorRoles" EntityType="PersonalLaundryModel.Store.OperatorRoles" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Settings" EntityType="PersonalLaundryModel.Store.Settings" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="WorkloadItems" EntityType="PersonalLaundryModel.Store.WorkloadItems" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="Workloads" EntityType="PersonalLaundryModel.Store.Workloads" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="WorkloadStatus" EntityType="PersonalLaundryModel.Store.WorkloadStatus" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="WorkloadTypes" EntityType="PersonalLaundryModel.Store.WorkloadTypes" store:Type="Tables" Schema="dbo" />
    <EntitySet Name="CustomerInventoryForWorkload" EntityType="PersonalLaundryModel.Store.CustomerInventoryForWorkload" store:Type="Views" store:Schema="dbo" store:Name="CustomerInventoryForWorkload">
      <DefiningQuery>SELECT 
      [CustomerInventoryForWorkload].[CustomerId] AS [CustomerId], 
      [CustomerInventoryForWorkload].[WorkloadId] AS [WorkloadId], 
      [CustomerInventoryForWorkload].[CustomerInventoryId] AS [CustomerInventoryId], 
      [CustomerInventoryForWorkload].[Category] AS [Category], 
      [CustomerInventoryForWorkload].[ItemType] AS [ItemType], 
      [CustomerInventoryForWorkload].[Size] AS [Size], 
      [CustomerInventoryForWorkload].[Count] AS [Count], 
      [CustomerInventoryForWorkload].[TCOrderPriority] AS [TCOrderPriority], 
      [CustomerInventoryForWorkload].[TSOrderPriority] AS [TSOrderPriority]
      FROM [dbo].[CustomerInventoryForWorkload] AS [CustomerInventoryForWorkload]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="CustomerInventoryForWorkloadClosed" EntityType="PersonalLaundryModel.Store.CustomerInventoryForWorkloadClosed" store:Type="Views" store:Schema="dbo" store:Name="CustomerInventoryForWorkloadClosed">
      <DefiningQuery>SELECT 
      [CustomerInventoryForWorkloadClosed].[CustomerId] AS [CustomerId], 
      [CustomerInventoryForWorkloadClosed].[WorkloadId] AS [WorkloadId], 
      [CustomerInventoryForWorkloadClosed].[CustomerInventoryId] AS [CustomerInventoryId], 
      [CustomerInventoryForWorkloadClosed].[Category] AS [Category], 
      [CustomerInventoryForWorkloadClosed].[ItemType] AS [ItemType], 
      [CustomerInventoryForWorkloadClosed].[Size] AS [Size], 
      [CustomerInventoryForWorkloadClosed].[Count] AS [Count], 
      [CustomerInventoryForWorkloadClosed].[TCOrderPriority] AS [TCOrderPriority], 
      [CustomerInventoryForWorkloadClosed].[TSOrderPriority] AS [TSOrderPriority]
      FROM [dbo].[CustomerInventoryForWorkloadClosed] AS [CustomerInventoryForWorkloadClosed]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwCustomerBagsWaitingCounting" EntityType="PersonalLaundryModel.Store.vwCustomerBagsWaitingCounting" store:Type="Views" store:Schema="dbo" store:Name="vwCustomerBagsWaitingCounting">
      <DefiningQuery>SELECT 
      [vwCustomerBagsWaitingCounting].[CustomerId] AS [CustomerId], 
      [vwCustomerBagsWaitingCounting].[Name] AS [Name], 
      [vwCustomerBagsWaitingCounting].[BagCount] AS [BagCount]
      FROM [dbo].[vwCustomerBagsWaitingCounting] AS [vwCustomerBagsWaitingCounting]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwInventoryItemTypes" EntityType="PersonalLaundryModel.Store.vwInventoryItemTypes" store:Type="Views" store:Schema="dbo" store:Name="vwInventoryItemTypes">
      <DefiningQuery>SELECT 
      [vwInventoryItemTypes].[Category] AS [Category], 
      [vwInventoryItemTypes].[ItemType] AS [ItemType]
      FROM [dbo].[vwInventoryItemTypes] AS [vwInventoryItemTypes]</DefiningQuery>
    </EntitySet>
    <EntitySet Name="vwWorkloadCategoryTypeCounts" EntityType="PersonalLaundryModel.Store.vwWorkloadCategoryTypeCounts" store:Type="Views" store:Schema="dbo" store:Name="vwWorkloadCategoryTypeCounts">
      <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="PersonalLaundryModel.Store.vwWorkloadStatusReport" store:Type="Views" store:Schema="dbo" store:Name="vwWorkloadStatusReport">
      <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>
    <AssociationSet Name="FK_CustomerInventory_Customer" Association="PersonalLaundryModel.Store.FK_CustomerInventory_Customer">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="CustomerInventory" EntitySet="CustomerInventory" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerInventory_InventoryItemTypes" Association="PersonalLaundryModel.Store.FK_CustomerInventory_InventoryItemTypes">
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
      <End Role="CustomerInventory" EntitySet="CustomerInventory" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerInventory_OperatorLogins" Association="PersonalLaundryModel.Store.FK_CustomerInventory_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="CustomerInventory" EntitySet="CustomerInventory" />
    </AssociationSet>
    <AssociationSet Name="FK_CustomerLogins_Customers" Association="PersonalLaundryModel.Store.FK_CustomerLogins_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
    </AssociationSet>
    <AssociationSet Name="FK_Customers_BillingProfiles" Association="PersonalLaundryModel.Store.FK_Customers_BillingProfiles">
      <End Role="BillingProfiles" EntitySet="BillingProfiles" />
      <End Role="Customers" EntitySet="Customers" />
    </AssociationSet>
    <AssociationSet Name="FK_Customers_OperatorLogins" Association="PersonalLaundryModel.Store.FK_Customers_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="Customers" EntitySet="Customers" />
    </AssociationSet>
    <AssociationSet Name="FK_Dispatches_DispatchStatus" Association="PersonalLaundryModel.Store.FK_Dispatches_DispatchStatus">
      <End Role="DispatchStatus" EntitySet="DispatchStatus" />
      <End Role="Dispatches" EntitySet="Dispatches" />
    </AssociationSet>
    <AssociationSet Name="FK_Dispatches_Invoices" Association="PersonalLaundryModel.Store.FK_Dispatches_Invoices">
      <End Role="Invoices" EntitySet="Invoices" />
      <End Role="Dispatches" EntitySet="Dispatches" />
    </AssociationSet>
    <AssociationSet Name="FK_Dispatches_OperatorLogins" Association="PersonalLaundryModel.Store.FK_Dispatches_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="Dispatches" EntitySet="Dispatches" />
    </AssociationSet>
    <AssociationSet Name="FK_DispatchItems_Dispatches" Association="PersonalLaundryModel.Store.FK_DispatchItems_Dispatches">
      <End Role="Dispatches" EntitySet="Dispatches" />
      <End Role="DispatchItems" EntitySet="DispatchItems" />
    </AssociationSet>
    <AssociationSet Name="FK_DispatchItems_InvoiceItems" Association="PersonalLaundryModel.Store.FK_DispatchItems_InvoiceItems">
      <End Role="InvoiceItems" EntitySet="InvoiceItems" />
      <End Role="DispatchItems" EntitySet="DispatchItems" />
    </AssociationSet>
    <AssociationSet Name="FK_InventoryItems_Customers" Association="PersonalLaundryModel.Store.FK_InventoryItems_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="InventoryItems" EntitySet="InventoryItems" />
    </AssociationSet>
    <AssociationSet Name="FK_InventoryItems_InventoryItemTypes" Association="PersonalLaundryModel.Store.FK_InventoryItems_InventoryItemTypes">
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
      <End Role="InventoryItems" EntitySet="InventoryItems" />
    </AssociationSet>
    <AssociationSet Name="FK_InventoryItemTypes_InventoryItemTypeCategories" Association="PersonalLaundryModel.Store.FK_InventoryItemTypes_InventoryItemTypeCategories">
      <End Role="InventoryItemTypeCategories" EntitySet="InventoryItemTypeCategories" />
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
    </AssociationSet>
    <AssociationSet Name="FK_InventoryItemTypes_InventoryItemTypeSize" Association="PersonalLaundryModel.Store.FK_InventoryItemTypes_InventoryItemTypeSize">
      <End Role="InventoryItemTypeSize" EntitySet="InventoryItemTypeSize" />
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
    </AssociationSet>
    <AssociationSet Name="FK_InvoiceItems_InventoryItemTypes" Association="PersonalLaundryModel.Store.FK_InvoiceItems_InventoryItemTypes">
      <End Role="InventoryItemTypes" EntitySet="InventoryItemTypes" />
      <End Role="InvoiceItems" EntitySet="InvoiceItems" />
    </AssociationSet>
    <AssociationSet Name="FK_InvoiceItems_Invoices" Association="PersonalLaundryModel.Store.FK_InvoiceItems_Invoices">
      <End Role="Invoices" EntitySet="Invoices" />
      <End Role="InvoiceItems" EntitySet="InvoiceItems" />
    </AssociationSet>
    <AssociationSet Name="FK_InvoiceItems_OperatorLogins" Association="PersonalLaundryModel.Store.FK_InvoiceItems_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="InvoiceItems" EntitySet="InvoiceItems" />
    </AssociationSet>
    <AssociationSet Name="FK_Invoices_Customers" Association="PersonalLaundryModel.Store.FK_Invoices_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="Invoices" EntitySet="Invoices" />
    </AssociationSet>
    <AssociationSet Name="FK_Invoices_InvoiceStatus" Association="PersonalLaundryModel.Store.FK_Invoices_InvoiceStatus">
      <End Role="InvoiceStatus" EntitySet="InvoiceStatus" />
      <End Role="Invoices" EntitySet="Invoices" />
    </AssociationSet>
    <AssociationSet Name="FK_Invoices_OperatorLogins" Association="PersonalLaundryModel.Store.FK_Invoices_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="Invoices" EntitySet="Invoices" />
    </AssociationSet>
    <AssociationSet Name="FK_Invoices_Workloads" Association="PersonalLaundryModel.Store.FK_Invoices_Workloads">
      <End Role="Workloads" EntitySet="Workloads" />
      <End Role="Invoices" EntitySet="Invoices" />
    </AssociationSet>
    <AssociationSet Name="FK_OperatorLogins_OperatorRoles" Association="PersonalLaundryModel.Store.FK_OperatorLogins_OperatorRoles">
      <End Role="OperatorRoles" EntitySet="OperatorRoles" />
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadBags_CustomerLogins" Association="PersonalLaundryModel.Store.FK_WorkloadBags_CustomerLogins">
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
      <End Role="CustomerWorkloadBags" EntitySet="CustomerWorkloadBags" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadBags_Workloads" Association="PersonalLaundryModel.Store.FK_WorkloadBags_Workloads">
      <End Role="Workloads" EntitySet="Workloads" />
      <End Role="CustomerWorkloadBags" EntitySet="CustomerWorkloadBags" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItems_CustomerInventory" Association="PersonalLaundryModel.Store.FK_WorkloadItems_CustomerInventory">
      <End Role="CustomerInventory" EntitySet="CustomerInventory" />
      <End Role="WorkloadItems" EntitySet="WorkloadItems" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItems_CustomerLogins" Association="PersonalLaundryModel.Store.FK_WorkloadItems_CustomerLogins">
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
      <End Role="WorkloadItems" EntitySet="WorkloadItems" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItems_OperatorLogins" Association="PersonalLaundryModel.Store.FK_WorkloadItems_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="WorkloadItems" EntitySet="WorkloadItems" />
    </AssociationSet>
    <AssociationSet Name="FK_WorkloadItems_Workloads" Association="PersonalLaundryModel.Store.FK_WorkloadItems_Workloads">
      <End Role="Workloads" EntitySet="Workloads" />
      <End Role="WorkloadItems" EntitySet="WorkloadItems" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_CustomerLogins" Association="PersonalLaundryModel.Store.FK_Workloads_CustomerLogins">
      <End Role="CustomerLogins" EntitySet="CustomerLogins" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_Customers" Association="PersonalLaundryModel.Store.FK_Workloads_Customers">
      <End Role="Customers" EntitySet="Customers" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_OperatorLogins" Association="PersonalLaundryModel.Store.FK_Workloads_OperatorLogins">
      <End Role="OperatorLogins" EntitySet="OperatorLogins" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_WorkloadStatus" Association="PersonalLaundryModel.Store.FK_Workloads_WorkloadStatus">
      <End Role="WorkloadStatus" EntitySet="WorkloadStatus" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
    <AssociationSet Name="FK_Workloads_WorkloadTypes" Association="PersonalLaundryModel.Store.FK_Workloads_WorkloadTypes">
      <End Role="WorkloadTypes" EntitySet="WorkloadTypes" />
      <End Role="Workloads" EntitySet="Workloads" />
    </AssociationSet>
  </EntityContainer>
  <EntityType Name="BillingProfiles">
    <Key>
      <PropertyRef Name="BillingProfileId" />
    </Key>
    <Property Name="BillingProfileId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="ProfileName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="IncludeRewashInInvoice" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="CustomerInventory">
    <Key>
      <PropertyRef Name="CustomerInventoryId" />
    </Key>
    <Property Name="CustomerInventoryId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <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" Nullable="false" />
    <Property Name="CostRepeatWash" Type="int" Nullable="false" />
    <Property Name="CostStainWash" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="CustomerLogins">
    <Key>
      <PropertyRef Name="CustomerLoginId" />
    </Key>
    <Property Name="CustomerLoginId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="GUID" Type="uniqueidentifier" Nullable="false" />
    <Property Name="CustomerId" Type="int" Nullable="false" />
    <Property Name="EmailAddress" Type="nvarchar" Nullable="false" MaxLength="100" />
    <Property Name="Password" Type="nvarchar" Nullable="false" MaxLength="50" />
    <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" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Name" Type="nvarchar" Nullable="false" MaxLength="100" />
    <Property Name="BillingProfileId" Type="int" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="EmailAddress" Type="nvarchar" Nullable="false" 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" />
  </EntityType>
  <EntityType Name="CustomerWorkloadBags">
    <Key>
      <PropertyRef Name="WorkloadBagId" />
    </Key>
    <Property Name="WorkloadBagId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="WorkloadId" Type="int" Nullable="false" />
    <Property Name="UniqueReference" Type="nvarchar" Nullable="false" MaxLength="50" />
    <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" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="InvoiceId" Type="int" Nullable="false" />
    <Property Name="DateCreated" Type="datetime" Nullable="false" />
    <Property Name="OperatorLoginId" Type="int" Nullable="false" />
    <Property Name="DispatchStatusId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="DispatchItems">
    <Key>
      <PropertyRef Name="DispatchItemId" />
    </Key>
    <Property Name="DispatchItemId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="DispatchId" Type="int" Nullable="false" />
    <Property Name="InvoiceItemId" Type="int" Nullable="false" />
    <Property Name="ItemCount" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="DispatchStatus">
    <Key>
      <PropertyRef Name="DispatchStatusId" />
    </Key>
    <Property Name="DispatchStatusId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Status" Type="nvarchar" Nullable="false" MaxLength="50" />
  </EntityType>
  <EntityType Name="InventoryItems">
    <Key>
      <PropertyRef Name="InventoryItemId" />
    </Key>
    <Property Name="InventoryItemId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <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" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Category" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="OrderPriority" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="InventoryItemTypes">
    <Key>
      <PropertyRef Name="InventoryItemTypeId" />
    </Key>
    <Property Name="InventoryItemTypeId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="InventoryItemTypeCategoryId" Type="int" Nullable="false" />
    <Property Name="InventoryItemTypeSizeId" Type="int" Nullable="false" />
    <Property Name="ItemType" Type="nvarchar" Nullable="false" MaxLength="100" />
  </EntityType>
  <EntityType Name="InventoryItemTypeSize">
    <Key>
      <PropertyRef Name="InventoryItemTypeSizeId" />
    </Key>
    <Property Name="InventoryItemTypeSizeId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Size" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="OrderPriority" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="InvoiceItems">
    <Key>
      <PropertyRef Name="InvoiceItemId" />
    </Key>
    <Property Name="InvoiceItemId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <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" />
  </EntityType>
  <EntityType Name="Invoices">
    <Key>
      <PropertyRef Name="InvoiceId" />
    </Key>
    <Property Name="InvoiceId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <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" />
  </EntityType>
  <EntityType Name="InvoiceStatus">
    <Key>
      <PropertyRef Name="InvoiceStatusId" />
    </Key>
    <Property Name="InvoiceStatusId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Status" Type="nvarchar" Nullable="false" MaxLength="50" />
  </EntityType>
  <EntityType Name="OperatorLogins">
    <Key>
      <PropertyRef Name="OperatorLoginId" />
    </Key>
    <Property Name="OperatorLoginId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Username" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Password" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="OperatorRoleId" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="OperatorRoles">
    <Key>
      <PropertyRef Name="OperatorRoleId" />
    </Key>
    <Property Name="OperatorRoleId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="RoleName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="CanLogin" Type="bit" Nullable="false" />
  </EntityType>
  <EntityType Name="Settings">
    <Key>
      <PropertyRef Name="SettingId" />
    </Key>
    <Property Name="SettingId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="SettingName" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="SettingValue" Type="nvarchar(max)" />
  </EntityType>
  <EntityType Name="WorkloadItems">
    <Key>
      <PropertyRef Name="WorkloadItemId" />
    </Key>
    <Property Name="WorkloadItemId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <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" Nullable="false" StoreGeneratedPattern="Identity" />
    <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" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Status" Type="nvarchar" Nullable="false" MaxLength="50" />
  </EntityType>
  <EntityType Name="WorkloadTypes">
    <Key>
      <PropertyRef Name="WorkloadTypeId" />
    </Key>
    <Property Name="WorkloadTypeId" Type="int" Nullable="false" StoreGeneratedPattern="Identity" />
    <Property Name="Type" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="CanStartCycle" Type="bit" Nullable="false" />
  </EntityType>
  <!--Errors Found During Generation:
      warning 6002: The table/view 'PersonalLaundry.dbo.CustomerInventoryForWorkload' 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="CustomerInventoryForWorkload">
    <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="WorkloadId" Type="int" />
    <Property Name="CustomerInventoryId" Type="int" Nullable="false" />
    <Property Name="Category" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ItemType" Type="nvarchar" Nullable="false" MaxLength="100" />
    <Property Name="Size" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Count" Type="nvarchar" MaxLength="30" />
    <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.CustomerInventoryForWorkloadClosed' 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="CustomerInventoryForWorkloadClosed">
    <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="WorkloadId" Type="int" />
    <Property Name="CustomerInventoryId" Type="int" Nullable="false" />
    <Property Name="Category" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="ItemType" Type="nvarchar" Nullable="false" MaxLength="100" />
    <Property Name="Size" Type="nvarchar" Nullable="false" MaxLength="50" />
    <Property Name="Count" Type="nvarchar" MaxLength="30" />
    <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.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" Nullable="false" MaxLength="100" />
    <Property Name="BagCount" Type="int" />
  </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" Nullable="false" MaxLength="50" />
    <Property Name="ItemType" Type="nvarchar" Nullable="false" MaxLength="100" />
  </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" Nullable="false" MaxLength="50" />
    <Property Name="ItemType" Type="nvarchar" Nullable="false" MaxLength="100" />
    <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" Nullable="false" MaxLength="50" />
    <Property Name="Customers" Type="int" />
    <Property Name="TotalItems" Type="int" />
  </EntityType>
  <Association Name="FK_CustomerInventory_Customer">
    <End Role="Customers" Type="PersonalLaundryModel.Store.Customers" Multiplicity="1" />
    <End Role="CustomerInventory" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.InventoryItemTypes" Multiplicity="1" />
    <End Role="CustomerInventory" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.OperatorLogins" Multiplicity="1" />
    <End Role="CustomerInventory" Type="PersonalLaundryModel.Store.CustomerInventory" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorLogins">
        <PropertyRef Name="OperatorLoginId" />
      </Principal>
      <Dependent Role="CustomerInventory">
        <PropertyRef Name="OperatorLoginId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_CustomerLogins_Customers">
    <End Role="Customers" Type="PersonalLaundryModel.Store.Customers" Multiplicity="1" />
    <End Role="CustomerLogins" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.BillingProfiles" Multiplicity="1" />
    <End Role="Customers" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.OperatorLogins" Multiplicity="1" />
    <End Role="Customers" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.DispatchStatus" Multiplicity="1" />
    <End Role="Dispatches" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.Invoices" Multiplicity="1" />
    <End Role="Dispatches" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.OperatorLogins" Multiplicity="1" />
    <End Role="Dispatches" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.Dispatches" Multiplicity="1" />
    <End Role="DispatchItems" Type="PersonalLaundryModel.Store.DispatchItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Dispatches">
        <PropertyRef Name="DispatchId" />
      </Principal>
      <Dependent Role="DispatchItems">
        <PropertyRef Name="DispatchId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_DispatchItems_InvoiceItems">
    <End Role="InvoiceItems" Type="PersonalLaundryModel.Store.InvoiceItems" Multiplicity="1" />
    <End Role="DispatchItems" Type="PersonalLaundryModel.Store.DispatchItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InvoiceItems">
        <PropertyRef Name="InvoiceItemId" />
      </Principal>
      <Dependent Role="DispatchItems">
        <PropertyRef Name="InvoiceItemId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InventoryItems_Customers">
    <End Role="Customers" Type="PersonalLaundryModel.Store.Customers" Multiplicity="1" />
    <End Role="InventoryItems" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.InventoryItemTypes" Multiplicity="1" />
    <End Role="InventoryItems" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.InventoryItemTypeCategories" Multiplicity="1" />
    <End Role="InventoryItemTypes" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.InventoryItemTypeSize" Multiplicity="1" />
    <End Role="InventoryItemTypes" Type="PersonalLaundryModel.Store.InventoryItemTypes" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="InventoryItemTypeSize">
        <PropertyRef Name="InventoryItemTypeSizeId" />
      </Principal>
      <Dependent Role="InventoryItemTypes">
        <PropertyRef Name="InventoryItemTypeSizeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_InvoiceItems_InventoryItemTypes">
    <End Role="InventoryItemTypes" Type="PersonalLaundryModel.Store.InventoryItemTypes" Multiplicity="1" />
    <End Role="InvoiceItems" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.Invoices" Multiplicity="1" />
    <End Role="InvoiceItems" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.OperatorLogins" Multiplicity="1" />
    <End Role="InvoiceItems" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.Customers" Multiplicity="1" />
    <End Role="Invoices" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.InvoiceStatus" Multiplicity="1" />
    <End Role="Invoices" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.OperatorLogins" Multiplicity="1" />
    <End Role="Invoices" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.Workloads" Multiplicity="1" />
    <End Role="Invoices" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.OperatorRoles" Multiplicity="1" />
    <End Role="OperatorLogins" Type="PersonalLaundryModel.Store.OperatorLogins" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="OperatorRoles">
        <PropertyRef Name="OperatorRoleId" />
      </Principal>
      <Dependent Role="OperatorLogins">
        <PropertyRef Name="OperatorRoleId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_WorkloadBags_CustomerLogins">
    <End Role="CustomerLogins" Type="PersonalLaundryModel.Store.CustomerLogins" Multiplicity="1" />
    <End Role="CustomerWorkloadBags" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.Workloads" Multiplicity="1" />
    <End Role="CustomerWorkloadBags" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.CustomerInventory" Multiplicity="1" />
    <End Role="WorkloadItems" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.CustomerLogins" Multiplicity="1" />
    <End Role="WorkloadItems" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.OperatorLogins" Multiplicity="1" />
    <End Role="WorkloadItems" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.Workloads" Multiplicity="1" />
    <End Role="WorkloadItems" Type="PersonalLaundryModel.Store.WorkloadItems" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Workloads">
        <PropertyRef Name="WorkloadId" />
      </Principal>
      <Dependent Role="WorkloadItems">
        <PropertyRef Name="WorkloadId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Workloads_CustomerLogins">
    <End Role="CustomerLogins" Type="PersonalLaundryModel.Store.CustomerLogins" Multiplicity="1" />
    <End Role="Workloads" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.Customers" Multiplicity="1" />
    <End Role="Workloads" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.OperatorLogins" Multiplicity="1" />
    <End Role="Workloads" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.WorkloadStatus" Multiplicity="1" />
    <End Role="Workloads" Type="PersonalLaundryModel.Store.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="PersonalLaundryModel.Store.WorkloadTypes" Multiplicity="1" />
    <End Role="Workloads" Type="PersonalLaundryModel.Store.Workloads" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="WorkloadTypes">
        <PropertyRef Name="WorkloadTypeId" />
      </Principal>
      <Dependent Role="Workloads">
        <PropertyRef Name="WorkloadTypeId" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Function Name="AcceptBag" 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="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" />
  </Function>
  <Function Name="DispatchItem" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo">
    <Parameter Name="InvoiceItemId" Type="int" Mode="In" />
    <Parameter Name="Count" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" 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="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="GetCustomerInventory" 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="GetInvoiceForPrinter" 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="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="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="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" />
  </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="Count" Type="int" Mode="In" />
    <Parameter Name="CustomerLoginId" Type="int" Mode="In" />
    <Parameter Name="OperatorLoginId" Type="int" Mode="In" />
  </Function>
</Schema>