<?xml version="1.0" encoding="utf-8"?>
<Schema Namespace="DataBaseModel" Alias="Self" annotation:UseStrongSpatialTypes="false" xmlns:annotation="http://schemas.microsoft.com/ado/2009/02/edm/annotation" xmlns:customannotation="http://schemas.microsoft.com/ado/2013/11/edm/customannotation" xmlns="http://schemas.microsoft.com/ado/2009/11/edm">
  <EntityContainer Name="DataBaseEntities" annotation:LazyLoadingEnabled="true">
    <EntitySet Name="Delivery_Points" EntityType="DataBaseModel.Delivery_Points" />
    <EntitySet Name="Manufacturer" EntityType="DataBaseModel.Manufacturer" />
    <EntitySet Name="Orders" EntityType="DataBaseModel.Orders" />
    <EntitySet Name="Products" EntityType="DataBaseModel.Products" />
    <EntitySet Name="Roles" EntityType="DataBaseModel.Roles" />
    <EntitySet Name="Users" EntityType="DataBaseModel.Users" />
    <EntitySet Name="Orders_Products" EntityType="DataBaseModel.Orders_Products" />
    <EntitySet Name="Warehouse" EntityType="DataBaseModel.Warehouse" />
    <AssociationSet Name="FK__Orders__Code_Poi__31EC6D26" Association="DataBaseModel.FK__Orders__Code_Poi__31EC6D26">
      <End Role="Delivery_Points" EntitySet="Delivery_Points" />
      <End Role="Orders" EntitySet="Orders" />
    </AssociationSet>
    <AssociationSet Name="FK__Products__Code_M__2B3F6F97" Association="DataBaseModel.FK__Products__Code_M__2B3F6F97">
      <End Role="Manufacturer" EntitySet="Manufacturer" />
      <End Role="Products" EntitySet="Products" />
    </AssociationSet>
    <AssociationSet Name="FK__Orders_Pr__Code___33D4B598" Association="DataBaseModel.FK__Orders_Pr__Code___33D4B598">
      <End Role="Orders" EntitySet="Orders" />
      <End Role="Orders_Products" EntitySet="Orders_Products" />
    </AssociationSet>
    <AssociationSet Name="FK__Orders_Pr__Code___34C8D9D1" Association="DataBaseModel.FK__Orders_Pr__Code___34C8D9D1">
      <End Role="Products" EntitySet="Products" />
      <End Role="Orders_Products" EntitySet="Orders_Products" />
    </AssociationSet>
    <AssociationSet Name="FK__Warehouse__Code___2D27B809" Association="DataBaseModel.FK__Warehouse__Code___2D27B809">
      <End Role="Products" EntitySet="Products" />
      <End Role="Warehouse" EntitySet="Warehouse" />
    </AssociationSet>
    <AssociationSet Name="FK__Users__Code_Role__267ABA7A" Association="DataBaseModel.FK__Users__Code_Role__267ABA7A">
      <End Role="Roles" EntitySet="Roles" />
      <End Role="Users" EntitySet="Users" />
    </AssociationSet>
  </EntityContainer>
  <EntityType Name="Delivery_Points">
    <Key>
      <PropertyRef Name="Code_Point" />
    </Key>
    <Property Name="Code_Point" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Name_Point" Type="String" Nullable="false" MaxLength="100" FixedLength="false" Unicode="true" />
    <NavigationProperty Name="Orders" Relationship="DataBaseModel.FK__Orders__Code_Poi__31EC6D26" FromRole="Delivery_Points" ToRole="Orders" />
  </EntityType>
  <EntityType Name="Manufacturer">
    <Key>
      <PropertyRef Name="Code_Manufacturer" />
    </Key>
    <Property Name="Code_Manufacturer" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Name_Manufacturer" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
    <NavigationProperty Name="Products" Relationship="DataBaseModel.FK__Products__Code_M__2B3F6F97" FromRole="Manufacturer" ToRole="Products" />
  </EntityType>
  <EntityType Name="Orders">
    <Key>
      <PropertyRef Name="Code_Order" />
    </Key>
    <Property Name="Code_Order" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Date_Order" Type="DateTime" Nullable="false" Precision="0" />
    <Property Name="Amount_Order" Type="Decimal" Nullable="false" Precision="10" Scale="2" />
    <Property Name="Amount_Discount" Type="Decimal" Nullable="false" Precision="3" Scale="2" />
    <Property Name="Code_Point" Type="Int32" Nullable="false" />
    <Property Name="Get_Code" Type="Int32" Nullable="false" />
    <Property Name="Date_Delivery" Type="DateTime" Nullable="false" Precision="0" />
    <NavigationProperty Name="Delivery_Points" Relationship="DataBaseModel.FK__Orders__Code_Poi__31EC6D26" FromRole="Orders" ToRole="Delivery_Points" />
    <NavigationProperty Name="Orders_Products" Relationship="DataBaseModel.FK__Orders_Pr__Code___33D4B598" FromRole="Orders" ToRole="Orders_Products" />
  </EntityType>
  <EntityType Name="Products">
    <Key>
      <PropertyRef Name="Code_Product" />
    </Key>
    <Property Name="Code_Product" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Name_Product" Type="String" Nullable="false" MaxLength="50" FixedLength="false" Unicode="true" />
    <Property Name="Description_Product" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
    <Property Name="Code_Manufacturer" Type="Int32" />
    <Property Name="Price_Product" Type="Decimal" Nullable="false" Precision="10" Scale="2" />
    <Property Name="Discount_Product" Type="Decimal" Nullable="false" Precision="3" Scale="2" />
    <Property Name="Photo_Product" Type="String" MaxLength="Max" FixedLength="false" Unicode="true" />
    <NavigationProperty Name="Manufacturer" Relationship="DataBaseModel.FK__Products__Code_M__2B3F6F97" FromRole="Products" ToRole="Manufacturer" />
    <NavigationProperty Name="Orders_Products" Relationship="DataBaseModel.FK__Orders_Pr__Code___34C8D9D1" FromRole="Products" ToRole="Orders_Products" />
    <NavigationProperty Name="Warehouse" Relationship="DataBaseModel.FK__Warehouse__Code___2D27B809" FromRole="Products" ToRole="Warehouse" />
  </EntityType>
  <EntityType Name="Roles">
    <Key>
      <PropertyRef Name="Code_Role" />
    </Key>
    <Property Name="Code_Role" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Name_Role" Type="String" Nullable="false" MaxLength="25" FixedLength="false" Unicode="true" />
    <NavigationProperty Name="Users" Relationship="DataBaseModel.FK__Users__Code_Role__267ABA7A" FromRole="Roles" ToRole="Users" />
  </EntityType>
  <EntityType Name="Users">
    <Key>
      <PropertyRef Name="Code_User" />
    </Key>
    <Property Name="Code_User" Type="Int32" Nullable="false" annotation:StoreGeneratedPattern="Identity" />
    <Property Name="Code_Role" Type="Int32" Nullable="false" />
    <Property Name="Surname_User" Type="String" Nullable="false" MaxLength="25" FixedLength="false" Unicode="true" />
    <Property Name="Name_User" Type="String" Nullable="false" MaxLength="25" FixedLength="false" Unicode="true" />
    <Property Name="Midname_User" Type="String" Nullable="false" MaxLength="25" FixedLength="false" Unicode="true" />
    <Property Name="Login_User" Type="String" Nullable="false" MaxLength="25" FixedLength="false" Unicode="true" />
    <Property Name="Password_User" Type="String" Nullable="false" MaxLength="25" FixedLength="false" Unicode="true" />
    <NavigationProperty Name="Roles" Relationship="DataBaseModel.FK__Users__Code_Role__267ABA7A" FromRole="Users" ToRole="Roles" />
  </EntityType>
  <EntityType Name="Orders_Products">
    <Key>
      <PropertyRef Name="Code_Order" />
      <PropertyRef Name="Code_Product" />
      <PropertyRef Name="Count_Product_Order" />
    </Key>
    <Property Name="Code_Order" Type="Int32" Nullable="false" />
    <Property Name="Code_Product" Type="Int32" Nullable="false" />
    <Property Name="Count_Product_Order" Type="Int32" Nullable="false" />
    <NavigationProperty Name="Orders" Relationship="DataBaseModel.FK__Orders_Pr__Code___33D4B598" FromRole="Orders_Products" ToRole="Orders" />
    <NavigationProperty Name="Products" Relationship="DataBaseModel.FK__Orders_Pr__Code___34C8D9D1" FromRole="Orders_Products" ToRole="Products" />
  </EntityType>
  <EntityType Name="Warehouse">
    <Key>
      <PropertyRef Name="Count_Product" />
    </Key>
    <Property Name="Code_Product" Type="Int32" />
    <Property Name="Count_Product" Type="Int32" Nullable="false" />
    <NavigationProperty Name="Products" Relationship="DataBaseModel.FK__Warehouse__Code___2D27B809" FromRole="Warehouse" ToRole="Products" />
  </EntityType>
  <Association Name="FK__Orders__Code_Poi__31EC6D26">
    <End Type="DataBaseModel.Delivery_Points" Role="Delivery_Points" Multiplicity="1" />
    <End Type="DataBaseModel.Orders" Role="Orders" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Delivery_Points">
        <PropertyRef Name="Code_Point" />
      </Principal>
      <Dependent Role="Orders">
        <PropertyRef Name="Code_Point" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__Products__Code_M__2B3F6F97">
    <End Type="DataBaseModel.Manufacturer" Role="Manufacturer" Multiplicity="0..1" />
    <End Type="DataBaseModel.Products" Role="Products" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Manufacturer">
        <PropertyRef Name="Code_Manufacturer" />
      </Principal>
      <Dependent Role="Products">
        <PropertyRef Name="Code_Manufacturer" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__Orders_Pr__Code___33D4B598">
    <End Type="DataBaseModel.Orders" Role="Orders" Multiplicity="1" />
    <End Type="DataBaseModel.Orders_Products" Role="Orders_Products" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Orders">
        <PropertyRef Name="Code_Order" />
      </Principal>
      <Dependent Role="Orders_Products">
        <PropertyRef Name="Code_Order" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__Orders_Pr__Code___34C8D9D1">
    <End Type="DataBaseModel.Products" Role="Products" Multiplicity="1" />
    <End Type="DataBaseModel.Orders_Products" Role="Orders_Products" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Products">
        <PropertyRef Name="Code_Product" />
      </Principal>
      <Dependent Role="Orders_Products">
        <PropertyRef Name="Code_Product" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__Warehouse__Code___2D27B809">
    <End Type="DataBaseModel.Products" Role="Products" Multiplicity="0..1" />
    <End Type="DataBaseModel.Warehouse" Role="Warehouse" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Products">
        <PropertyRef Name="Code_Product" />
      </Principal>
      <Dependent Role="Warehouse">
        <PropertyRef Name="Code_Product" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
  <Association Name="FK__Users__Code_Role__267ABA7A">
    <End Type="DataBaseModel.Roles" Role="Roles" Multiplicity="1" />
    <End Type="DataBaseModel.Users" Role="Users" Multiplicity="*" />
    <ReferentialConstraint>
      <Principal Role="Roles">
        <PropertyRef Name="Code_Role" />
      </Principal>
      <Dependent Role="Users">
        <PropertyRef Name="Code_Role" />
      </Dependent>
    </ReferentialConstraint>
  </Association>
</Schema>