<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="Хранилище BaseModel" Provider="System.Data.SqlClient" ProviderManifestToken="2012" 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="Category">
    <Key>
      <PropertyRef Name="CategoryID" />
    </Key>
    <Property Name="CategoryID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="CategoryName" Type="varchar" MaxLength="100" Nullable="false" />
  </EntityType>
  <EntityType Name="Manufacturer">
    <Key>
      <PropertyRef Name="ManufacturerID" />
    </Key>
    <Property Name="ManufacturerID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="ManufacturerName" Type="varchar" MaxLength="100" Nullable="false" />
  </EntityType>
  <EntityType Name="Order">
    <Key>
      <PropertyRef Name="OrderID" />
    </Key>
    <Property Name="OrderID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="OrderStatus" Type="int" Nullable="false" />
    <Property Name="OrderDeliveryDate" Type="datetime" Nullable="false" />
    <Property Name="OrderPickupPoint" Type="int" Nullable="false" />
    <Property Name="OrderCreationDate" Type="datetime" Nullable="false" />
    <Property Name="OrderCode" Type="int" Nullable="false" />
    <Property Name="OrderClientID" Type="int" />
  </EntityType>
  <EntityType Name="OrderProduct">
    <Key>
      <PropertyRef Name="OrderID" />
      <PropertyRef Name="ProductArticleNumber" />
    </Key>
    <Property Name="OrderID" Type="int" Nullable="false" />
    <Property Name="ProductArticleNumber" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Count" Type="int" Nullable="false" />
  </EntityType>
  <EntityType Name="PickupPoint">
    <Key>
      <PropertyRef Name="PickupPointID" />
    </Key>
    <Property Name="PickupPointID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="Index" Type="int" Nullable="false" />
    <Property Name="City" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="Street" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="House" Type="nvarchar" MaxLength="100" Nullable="false" />
  </EntityType>
  <EntityType Name="Product">
    <Key>
      <PropertyRef Name="ProductArticleNumber" />
    </Key>
    <Property Name="ProductArticleNumber" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="ProductName" Type="nvarchar(max)" Nullable="false" />
    <Property Name="ProductDescription" Type="nvarchar(max)" />
    <Property Name="ProductCategory" Type="int" Nullable="false" />
    <Property Name="ProductPhoto" Type="nvarchar(max)" />
    <Property Name="ProductManufacturer" Type="int" Nullable="false" />
    <Property Name="ProductCost" Type="decimal" Precision="19" Scale="4" Nullable="false" />
    <Property Name="ProductDiscountAmount" Type="tinyint" />
    <Property Name="ProductQuantityInStock" Type="int" Nullable="false" />
    <Property Name="ProductUnit" Type="varchar" MaxLength="50" Nullable="false" />
    <Property Name="ProductSuplier" Type="int" />
    <Property Name="ProductDiscount" Type="float" />
  </EntityType>
  <EntityType Name="Role">
    <Key>
      <PropertyRef Name="RoleID" />
    </Key>
    <Property Name="RoleID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="RoleName" Type="nvarchar" MaxLength="100" Nullable="false" />
  </EntityType>
  <EntityType Name="Supplier">
    <Key>
      <PropertyRef Name="SupplierID" />
    </Key>
    <Property Name="SupplierID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="SupplierName" Type="nvarchar" MaxLength="100" Nullable="false" />
  </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>
  <EntityType Name="User">
    <Key>
      <PropertyRef Name="UserID" />
    </Key>
    <Property Name="UserID" Type="int" StoreGeneratedPattern="Identity" Nullable="false" />
    <Property Name="UserSurname" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="UserName" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="UserPatronymic" Type="nvarchar" MaxLength="100" Nullable="false" />
    <Property Name="UserLogin" Type="nvarchar(max)" Nullable="false" />
    <Property Name="UserPassword" Type="nvarchar(max)" Nullable="false" />
    <Property Name="UserRole" Type="int" Nullable="false" />
  </EntityType>
  <Association Name="FK__OrderProd__Order__403A8C7D">
    <End Role="Order" Type="Self.Order" Multiplicity="1" />
    <End Role="OrderProduct" Type="Self.OrderProduct" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Order">
        <PropertyRef Name="OrderID" />
      </Principal>
      <Dependent Role="OrderProduct">
        <PropertyRef Name="OrderID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__OrderProd__Produ__412EB0B6">
    <End Role="Product" Type="Self.Product" Multiplicity="1" />
    <End Role="OrderProduct" Type="Self.OrderProduct" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Product">
        <PropertyRef Name="ProductArticleNumber" />
      </Principal>
      <Dependent Role="OrderProduct">
        <PropertyRef Name="ProductArticleNumber" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__User__UserRole__398D8EEE">
    <End Role="Role" Type="Self.Role" Multiplicity="1" />
    <End Role="User" Type="Self.User" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Role">
        <PropertyRef Name="RoleID" />
      </Principal>
      <Dependent Role="User">
        <PropertyRef Name="UserRole" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Order_PickupPoint">
    <End Role="PickupPoint" Type="Self.PickupPoint" Multiplicity="1" />
    <End Role="Order" Type="Self.Order" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="PickupPoint">
        <PropertyRef Name="PickupPointID" />
      </Principal>
      <Dependent Role="Order">
        <PropertyRef Name="OrderPickupPoint" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Order_User">
    <End Role="User" Type="Self.User" Multiplicity="0..1" />
    <End Role="Order" Type="Self.Order" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="User">
        <PropertyRef Name="UserID" />
      </Principal>
      <Dependent Role="Order">
        <PropertyRef Name="OrderClientID" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Product_Category">
    <End Role="Category" Type="Self.Category" Multiplicity="1" />
    <End Role="Product" Type="Self.Product" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Category">
        <PropertyRef Name="CategoryID" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="ProductCategory" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Product_Manufacturer">
    <End Role="Manufacturer" Type="Self.Manufacturer" Multiplicity="1" />
    <End Role="Product" Type="Self.Product" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Manufacturer">
        <PropertyRef Name="ManufacturerID" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="ProductManufacturer" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK_Product_Supplier">
    <End Role="Supplier" Type="Self.Supplier" Multiplicity="0..1" />
    <End Role="Product" Type="Self.Product" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Supplier">
        <PropertyRef Name="SupplierID" />
      </Principal>
      <Dependent Role="Product">
        <PropertyRef Name="ProductSuplier" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <EntityContainer Name="Хранилище BaseModelContainer">
    <EntitySet Name="Category" EntityType="Self.Category" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Manufacturer" EntityType="Self.Manufacturer" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Order" EntityType="Self.Order" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="OrderProduct" EntityType="Self.OrderProduct" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="PickupPoint" EntityType="Self.PickupPoint" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Product" EntityType="Self.Product" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Role" EntityType="Self.Role" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="Supplier" EntityType="Self.Supplier" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="sysdiagrams" EntityType="Self.sysdiagrams" Schema="dbo" store:Type="Tables" />
    <EntitySet Name="User" EntityType="Self.User" Schema="dbo" store:Type="Tables" />
    <AssociationSet Name="FK__OrderProd__Order__403A8C7D" Association="Self.FK__OrderProd__Order__403A8C7D">
      <End Role="Order" EntitySet="Order" />
      <End Role="OrderProduct" EntitySet="OrderProduct" />
    </AssociationSet>
    <AssociationSet Name="FK__OrderProd__Produ__412EB0B6" Association="Self.FK__OrderProd__Produ__412EB0B6">
      <End Role="Product" EntitySet="Product" />
      <End Role="OrderProduct" EntitySet="OrderProduct" />
    </AssociationSet>
    <AssociationSet Name="FK__User__UserRole__398D8EEE" Association="Self.FK__User__UserRole__398D8EEE">
      <End Role="Role" EntitySet="Role" />
      <End Role="User" EntitySet="User" />
    </AssociationSet>
    <AssociationSet Name="FK_Order_PickupPoint" Association="Self.FK_Order_PickupPoint">
      <End Role="PickupPoint" EntitySet="PickupPoint" />
      <End Role="Order" EntitySet="Order" />
    </AssociationSet>
    <AssociationSet Name="FK_Order_User" Association="Self.FK_Order_User">
      <End Role="User" EntitySet="User" />
      <End Role="Order" EntitySet="Order" />
    </AssociationSet>
    <AssociationSet Name="FK_Product_Category" Association="Self.FK_Product_Category">
      <End Role="Category" EntitySet="Category" />
      <End Role="Product" EntitySet="Product" />
    </AssociationSet>
    <AssociationSet Name="FK_Product_Manufacturer" Association="Self.FK_Product_Manufacturer">
      <End Role="Manufacturer" EntitySet="Manufacturer" />
      <End Role="Product" EntitySet="Product" />
    </AssociationSet>
    <AssociationSet Name="FK_Product_Supplier" Association="Self.FK_Product_Supplier">
      <End Role="Supplier" EntitySet="Supplier" />
      <End Role="Product" EntitySet="Product" />
    </AssociationSet>
  </EntityContainer>
</Schema>